How to prevent entities from crossing a Created 8 years ago2015-12-24 08:17:44 UTC by Dallas Dallas

Created 8 years ago2015-12-24 08:17:44 UTC by Dallas Dallas

Posted 8 years ago2015-12-24 08:17:44 UTC Post #327896
In a map of mine an entity (specifically a monster_apache helicopter) will follow my player from one map to the next map on a level change in single player HL1.

I don't want any monsters to follow the player on this level change.

How do I prevent monsters or specific entities from following my player across a level load?

Or, how do I determine which entities to take?

Thanks for your help.
Posted 8 years ago2015-12-24 09:37:32 UTC Post #327897
You can use the trigger_transition entity.

This will only carry over entities that are within it when the level change occurs.
monster_urby monster_urbyGoldsourcerer
Posted 8 years ago2015-12-24 10:43:33 UTC Post #327900
Perfect. Thank you.

Which types/classes of entities can be brought over with a trigger_transition?

And, when you do NOT use a trigger_transition, what entities are carried over? All of them? Which types classes? Just monsters?
Posted 8 years ago2015-12-24 13:53:54 UTC Post #327901
Just NPC's, dead or alive as far as I recall

You couldn't take a func_pushable from one map to the next for example.
monster_urby monster_urbyGoldsourcerer
Posted 8 years ago2016-03-01 07:03:32 UTC Post #329066
I believe Spirit will allow you more flexibility with things like this.
Posted 8 years ago2016-03-01 15:04:33 UTC Post #329071
In theory, "trigger_transition" will save anything that is inside it.

The following link will tell you what entity isn't saved directly and require a "trigger_transition" according to Half-Life's SDK (the tilde before FCAP_ACROSS_TRANSITION is very important because it means bitwise NOT in C) :
https://github.com/ValveSoftware/halflife/search?utf8=%E2%9C%93&q=~FCAP_ACROSS_TRANSITION&type=Code
You must be logged in to post a response.