npc actions in another room
Created 3 months ago2019-05-26 17:59:02 UTC by OPF2

hii want to know how to force npc's to do anything even when i am not in front of them or seeing them. If i am in room A and i put an npc in room b that's triggered to do any action why do the npc need to see you in order to move ?

No i tried to make them walk to a specific point in order to engage against monsters in another room just to make the player hear the sounds but they don't move until i see them . I tried also to trigger them to move through scripted sequence same thing

I took a brief look at this last night, compiled it and ran it and I'm honestly stumped. I created a simple test map where I triggered two grunts to run to the player through a series of corridors and they worked without any issues...

What I will say is, though it's obviously an unfinished map, that big box surrounding the map is very bad practice. You're going to be compiling and rendering so much more that you actually need to. I doubt that's the cause of the issue, but it's not great.

I got a little lost amongst the entities and triggers, but what is actually prompting them to move to the first room after killing the houndeyes? I couldn't find a trigger.

Actually i am using the big box to get rid of leaks since as you may already know i copied the map from Opposing forces and deleted many many things . As for the trigger there are none , as soon as they kill the houndeyes they are supposed to move to the next room to kill the other monsters

i'm not entirely sure, but I guess monsters fall into some kind of "sleep" state if the vis leaf they're in isn't rendered at the moment. this can be observed in Questionable Ethics when you enter the room with 2 alien grunts and filled with tripmines. If you go into the room above and hide in the left corner next to the window while the human grunts are breaching through the blast door, when they finish, there won't be any fight unless you take a peek at what's below through the window. Probably the visleaf the grunts are in gets hidden when you're in the corner, but I'm not sure about that.

I've had this problem in one of my maps too, where monsters in a monster box outside of the main map refused to react to scripted_sequences meant to teleport them in, unless I put an info_overview_point inside (or whatever that vhlt entity was that allows you render the whole map if you're in the same visleaf as that entity) and set it to reverse, so that the monster box is rendered no matter where you are in the map.

I doubt Valve have used hacks like that in their maps to warp monsters in, so there has to be an explanation. But for now, you should try using the aforementioned entity and reversing it by checking the corresponding spawnflag (don't forget that the entity is only present in the newer compilers), so that the room with the grunts is always seen. You also should get rid of this hack when an actual solution is found.

Tbh because of things like that I've mostly switched to Quake. Wish HL's ents were more reliable.

Actually i am using the big box to get rid of leaks since as you may already know i copied the map from Opposing forces and deleted many many things

Yeah, I suspected as such, but that doesn't change the fact that it's bad practice. As painstaking as it can be, it's far better to actually seal the leaks in your map that simply throw a box around the whole thing.