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

Created 5 years ago2019-05-26 17:59:02 UTC by OPF2 OPF2

Posted 5 years ago2019-05-26 17:59:02 UTC Post #342656
hi
i 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 ?

ps: i am working on the old half life engine here
Posted 5 years ago2019-05-27 12:25:51 UTC Post #342657
NPCs can be triggered to move at any point, you don't need to see them.
monster_urby monster_urbyGoldsourcerer
Posted 5 years ago2019-05-28 06:01:59 UTC Post #342659
Yeah, I’m not sure what this question is. All I can think of is you’re trying to make the npc itself trigger something via the Trigger Condition attribute? But then, you’d know that.
Jessie JessieTrans Rights <3
Posted 5 years ago2019-05-28 16:49:01 UTC Post #342663
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
Posted 5 years ago2019-05-29 01:17:25 UTC Post #342664
Are you able to provide the map, or at least of the section you're having this trouble with? Might make it easier to figure out what's going on.
Jessie JessieTrans Rights <3
Posted 5 years ago2019-05-29 16:30:11 UTC Post #342670
its the soldiers sold1 and sold2 that need to kill the houndeyes and then proceed to kill the slave and grunt
https://ufile.io/7jls8pdg
Posted 5 years ago2019-05-30 14:49:55 UTC Post #342675
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.
monster_urby monster_urbyGoldsourcerer
Posted 5 years ago2019-05-30 20:50:59 UTC Post #342676
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
Posted 5 years ago2019-05-31 05:48:15 UTC Post #342677
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.
Posted 5 years ago2019-05-31 13:31:47 UTC Post #342678
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.
monster_urby monster_urbyGoldsourcerer
You must be logged in to post a response.