Configuring func_trains/func_tracktrains
by Andrei (view all articles)

unrated
Tutorial for all those newbies out there.
by Andrei (view all articles)

unrated

func_tracktrain:
Targetname ?train?
Target: (Name of the first path_track.)
Sounds: (The sound it makes while moving.)
Wheels: (Distance between the trains wheels; select the train and enter a number like 100.Youll see a line showing the respective distance, keep reducing the number untill it suits your needs.)
NOTE: If you want to make a plane, you should stick to making it a func_train.
Height: (The height above the track; shown in the editor the same way as the distance between wheels is.You should put the trains path_track entities right on the surface of the track, just like you do with decals, and set its height so that the line ends right on the surface of the path_track.)
Startspeed: (The trains initial speed.Leave this blank if the trains is going to be usable by the player.)
Speed: (The trains maximum speed; the flatbed train in Half-life has 250.)
Dmg: (Damage inflicted when the train catches something against a wall or something.)
Volume: (The sounds intensity.)
Bank: (How many degrees does the train pitch horizontally when making a curve.)
FLAGS:
No Pitch (x-rot) - Check this if the train must behave like a cable car (doesn?t pitch down when going down hill).
No User Control ? If checked, the user wont be able to control the trains speed.
Passable ? Defines wether the player can pass right through it or not.
NOTE: You must include an origin brush to define the point around wich the func_tracktrain rotates around when making corners or pitching.
To add an origin, spawn a cube, give it the ?origin? texture (under ?extra? in the texture browser), shrink it and insert it in the trains group.
func_trains:
Func_Trains are configured about the same way as a func_tracktrain, exept that, due to the lack of an origin brush, there arent any height, distance between wheels, pitch and rotation flags.Thus, the func_train wont rotate when changing direction and wont pitch.
path_tracks
Path_Tracks represent ?waypoints? for the func_train/func_tracktrain (but also for other entities). A trains first path_track will always determine its front and direction.If the train is moving the wrong way in game just rotate it (For example, if its left side is treated like its front is supposed to, rotate it in the editor in such a way that it appears the way it did in game before; youll notice that once you compile and run the map like this, the train will be facing in the corect direction).
Targetname ?train?
Target: (Name of the first path_track.)
Sounds: (The sound it makes while moving.)
Wheels: (Distance between the trains wheels; select the train and enter a number like 100.Youll see a line showing the respective distance, keep reducing the number untill it suits your needs.)
NOTE: If you want to make a plane, you should stick to making it a func_train.
Height: (The height above the track; shown in the editor the same way as the distance between wheels is.You should put the trains path_track entities right on the surface of the track, just like you do with decals, and set its height so that the line ends right on the surface of the path_track.)
Startspeed: (The trains initial speed.Leave this blank if the trains is going to be usable by the player.)
Speed: (The trains maximum speed; the flatbed train in Half-life has 250.)
Dmg: (Damage inflicted when the train catches something against a wall or something.)
Volume: (The sounds intensity.)
Bank: (How many degrees does the train pitch horizontally when making a curve.)
FLAGS:
No Pitch (x-rot) - Check this if the train must behave like a cable car (doesn?t pitch down when going down hill).
No User Control ? If checked, the user wont be able to control the trains speed.
Passable ? Defines wether the player can pass right through it or not.
NOTE: You must include an origin brush to define the point around wich the func_tracktrain rotates around when making corners or pitching.
To add an origin, spawn a cube, give it the ?origin? texture (under ?extra? in the texture browser), shrink it and insert it in the trains group.


func_trains:
Func_Trains are configured about the same way as a func_tracktrain, exept that, due to the lack of an origin brush, there arent any height, distance between wheels, pitch and rotation flags.Thus, the func_train wont rotate when changing direction and wont pitch.
path_tracks
Path_Tracks represent ?waypoints? for the func_train/func_tracktrain (but also for other entities). A trains first path_track will always determine its front and direction.If the train is moving the wrong way in game just rotate it (For example, if its left side is treated like its front is supposed to, rotate it in the editor in such a way that it appears the way it did in game before; youll notice that once you compile and run the map like this, the train will be facing in the corect direction).