How to make Trains

Apr 19, 2009
4,460
1,722
The only thing that is keeping me from putting pl_railway_a3 out is the train from cp_well. I tried to copy it directly from well and failed at it. All I want is a Train with 3-4 Railcars connected to it and for the train to go from one end of the map to the other every few minutes down a strait line of track. If someone could give me a easy to fallow guide that would be great!

P.S. Yes I did search the forums for how to do this and they were not very helpful.
 
Apr 13, 2009
728
309
The train from well is a little special because it goes off into the 3D skybox.If you don't want to bother with that, setting a basic train is relatively easy :

Lay some path_tracks along your tracks : have one for your train at its starting position and another one at its ending position, that should do it at first. Then make the first path_track target the ending path_track, and vice versa. You may want to tick the "teleport to this" flag on the starting path_track.
Make a func_tracktrain out of a block covered with the nodraw texture. Set its starting position to your first path_track.
Have a prop_static (or is it dynamic ?) for every car of your train and set its parent to your func_tracktrain.
Have an entity (anything... trigger_auto ?) start your func_tracktrain.
Enjoy the mess, you'll probably need to adjust direction and position a bit.
Once you've nailed it, add a trigger_hurt with freeze damage at the front of the train and set its parent to the func_tracktrain. It will kill people instead of pushing them.

And then you'll want to add an ambient_generic for the sound of the train, and probably trigger some events like doors opening and all kind of stuff too complex to list here, but cp_well is your reference. At least I hope you can get the basics working with the advices above...
 

RallY

L1: Registered
May 13, 2009
10
3
i found a solution on how to do it and i posted it, maybe yours is easier...why not post it. after all tf2maps.net is all about sharing knowledge, right ;)