Train carriages.

Basic

L1: Registered
Jul 19, 2009
3
0
I've been learning the hammer editor, and have run into an issue with trains.

I can make train, I can make it move etc...

how to I make a train that has several carriages long. I've been trying to using phys_hinge and phys_lengthconstraint to link the two carriages, but in both cases the train leaves the carriage behind.

perhaps I've been seaching the wrong things but I cant seem to find any info on it.
 

Forthex

L2: Junior Member
Aug 2, 2008
80
12
1) Orient, in hammer, how you want your train (engine and carriages) to start in game

2) Make a func_tracktrain brush (with all faces of nodraw texture) for the engine and each separate carriage (give them all different names), and parent each brush/model to its designated func_tracktrain. You can put the func_tracktrains wherever you want, and make them whatever size you want, but I find the easiest thing to do is to make the func_tracktrain as long and wide as the train's model (this is so that the absolute x/y middle of the func_tracktrain brush is in the same position as the absolute x/y middle of the model)

3) Put a path_track entity in the x/y middle of the last carriage, give it a name, and shift-drag (clone) it to the x/y middle of the next carriage. Keep doing this until each carriage has a path_track in its x/y middle

4) Go into the properties of each func_tracktrain and make each of their "First Stop Target" values the name of the path_track in the middle of their corresponding func_tracktrains

5) If the trains direction initial direction is not East (or to the right in the Top View in Hammer), rotate each carriage model and its func_tracktrain so that they face East.