func_train Locational Triggers

Jimbo asked on func_msgboard if it was possible to activate a trigger when a func_train passes a particular point¹ and if triggers could be created that monsters can activate. necros answered the second half of that question, and you should go read his answer now, because we’re now going to use it to build a hack for the first part. Be warned, this one is on the hacky side of map hacks, but anyway…

Build your func_train first, then directly above the func_train, outside the extent of the playable map, make a cage from brushes large enough to contain a monster_knight. Add these brushes to your func_train, so that both the train and the cage form a single func_train entity and will move in lockstep.

Next we need to add the monster_knight to the cage. This is the really fiddly bit, because your func_train gets teleported to the position of its first waypoint when it spawns, and you need the knight to still be trapped inside when that happens. I suggest positioning your func_train in the correct starting position, so the first path_corner is exactly on its minimum extent in all directions, so that it in effect doesn’t move. Incidentally, this is why we put the cage ABOVE the map instead of below it, because you don’t need to change the path_corner positions that way!

Finally, we use the hack necros described to make a trigger that activates when monsters touch it, and position that in the path of our knight above the level, so that when the train reaches the appropriate position, the trigger will touch the knight in the cage for the first time. You’ll also need to seal the entire area your cage floats in, without obstructing the knight as otherwise he’ll block the train below.

So that’s about it, besides tidying up. You might not like that there’s an extra knight in your map now, denying players 100% kills. A good solution might be to teleport this knight in at a later date, using a large teleport trigger that covers the whole span that the cage covers. You can of course substitute a monster appropriate to the combat². Finally, you could try experimenting to see if any other entity can cause a collision, like an exploding barrel or an ammo crate, or something monstrous you can hack together from an info_notnull…


  1. OK, I took liberties here, Jimbo spoke about reaching a path_corner, while today’s hack will trigger if the train passes the target point, regardless of whether that point was the navigation target. However, I think the additional flexibility on choosing where to have a trigger fire outweighs any occasions this distinction might cause an issue.
  2. If you just want to teleport a monster in when the train hits a particular point, you can replace the hacked monster trigger with the teleport trigger directly, much simpler, and you could have multiple cages on-the-go at once if careful.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s