A func_train is moving object that travels along a specified path. For those of you familiar with quake1 editing then your probably familiar with func_trains. They are not the easiest entity to use but they are not extremely difficult.
How do I get the dang thing to work?!
It takes at least 2 entities to get a func_train in working order. The actual func_train and more then 1 path_corner. The path_corners specify the actual path that the func_train will follow. We will get to that in a little later though.
First thing you need to do is to build the actual object that will be the func_train. This can be one single brush or multiple brushes, it all depends on what you want the train to be. After you have build the object then you will need to turn the object into a func_train entity. It does not matter where you place the func_train because it will automatically spawn at the first path_corner.
The second thing that you need to do is to make all your path_corners. These will be the actual path that the func_train will follow as mentioned above. Each path_corner will link to the next. So if I made a lift that would travel around the corners of a square room then I would have 4 path_corners. The first one would have a targetname p1, and a target p2. The second one would have a targetname p2 and a target p3. Third one would have a targetname p3 and a target p4. The fourth one would have a targetname p4 and if you wanted the lift to continuously travel around the room then you would give it a target p1, which is the targetname of the first path_corner. Now I am going to go into more detail on all the different key value pairs and spawnflags.
Key Value Pairs of the func_train
speed is simply the speed that the func_train will travel from path_corner to path_corner.
dmg is the amount of damage the train will inflict when it crushes you up agaist a object. What I mean is it won't take off damage by just touching you...only when you are like...trapped up against a wall and the func_train.
noise is the sound that will be played when the func_train is moving. Here is a list of sounds that you can use. Don't forget to include the directory along with the sound name. Example: noise world/pump1.wav.
target will be set to the first path_corner. A func_train MUST have a target key and it MUST be a path_corner.
If a func_train has a targetname then it will have to be triggered before it will be become active.
Spawnflags of the func_train
By default a train will only start moving when triggered by another entity. If you set the start_on spawnflag then the func_train will start moving when the level starts.
toggle will allow the func_train to be toggled on and off numerous
times. It will only work when a func_train is triggered into
action multiple times by another entity such as a func_button.
This is useful in making moving elevator type platforms.
When the spawnflag block_stops is set the func_train will stop completely when an entity like the player is blocking its way and it won't take any damage off. EVEN if the dmg key is set.
Other misc. things you might like to know about the func_train and path_corners