func_train

A func_train moves along a path of path_corner entities, from one to the next, and waits at each
one as long as its Wait here says. The middle of the brush goes to each path_corner, and without a Name, the
train starts by itself.
Attributes
The entity also has these common keys:
- Naming and triggering: Global Entity Name
- Appearance: Render FX, Render Mode, FX Amount and FX Color
- Compiler keys of brush entities: all of them
targetnameTriggering the entity starts or stops the train, and Obey Trigger Mode sets how. See Common keys.
movesndSets the sound it plays while it moves, and if you set Custom move sound, it ignores this key.The 14 choices
No Sound (0)stopsndSets the sound it plays when it stops, and if you set Custom stop sound, it ignores this key.The 9 choices
No Sound (0)volumeSets how loud the move and stop sounds are, from 0.0 for silent up to 1.0 for full volume.
If you leave this key empty or set 0, it is 0.85.
0.85Names the entities to trigger each time the train sets off toward the next path_corner, at every corner.
Sets the use type that the Fire On Start targets get.
- Off (0)
- On (1)
- Toggle (2)
Off (0)Names the entities to trigger each time the train stops: at a corner with a wait, at the end of the path, or when you stop it.
Sets the use type that the Fire On Stop targets get.
- Off (0)
- On (1)
- Toggle (2)
Off (0)Sets how far away players hear its move and stop sounds.
- Small (-2) - Up to about 500 units away
- Medium (-1) - Up to about 800 units away
- Default (large) (0) - Up to about 1250 units away
- Huge (1) - Up to about 2000 units away
- Enormous (2) - Up to about 4000 units away
- Play Everywhere (3) - Anywhere on the map, at full volume
Default (large) (0)targetNames the first path_corner, where the train starts when the map starts and moves on along the path from there.
speedSets how fast the train moves, in units per second, and 0 means 100. A path_corner with a New Train Speed changes it.
64avelocityMakes the train turn all the time, as three speeds in degrees per second for the turns around the Y, the Z (vertical) and the X axes.
dmgSets the damage dealt to anything that blocks the train, at most every half second.
If you leave this key empty or set 0, it is 2, unless the train has No default damage.
0skinWith Not solid, sets what the brush is filled with: -3 is water, -4 is slime, -5 is lava and 0 is a normal brush.
0Sets how a trigger starts and stops the train.
- No (0) - Every trigger starts or stops it, as in Half-Life
- Yes (1) - On starts it, Off stops it and Toggle switches it, so On while it moves and Off while it stands still do nothing
No (0)Flags
4Initially OnA train with a Name starts moving when the map starts. A train without a name always does
8Not solidPlayers, monsters and shots pass through the train
Notes
- When a trigger stops the train, its move sound stops and its stop sound plays
- From a
path_cornerwith New Train rot. Speed, the train turns around its vertical axis while it moves
See also
path_corner- the stops of the pathfunc_tracktrain- a train that players drive along a trackenv_modeltrain- a model that moves along a path- func_train on TWHL - the Half-Life entity
Changes since 1.38
- You can use the new keys Obey Trigger Mode, Fire On Start, Fire On Stop, Move sound pitch, Sound radius and the custom move and stop sounds, and the new flags Initially On and No default damage
- A train that a trigger stops also stops its move sound. In SBO 1.38, the sound kept looping until the train moved again
- Fixed the New Train rot. Speed key of
path_cornerbeing ignored. The game never read the key

