Snarkpit Articles


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).


Post ReplyView Topic
Discussion
0 starsPosted by erbetal on Thu Apr 10th 2008 at 3:13pm

This tutorial helped me a lot.
0 starsPosted by warlord on Wed Sep 17th 2003 at 6:49am

i have discovered somthing about tracktrains
how you have the distance between wheels set up is wrong
i noticed this when i played hl and noticed how the front of the train would always seem to off the track when it came to turns
i also noticed that the origin shouldnt be in the center unless you want it to pivot from the center
i cant explain it too well but this i know i am very right
ill make an example map with the differences
0 starsPosted by Gollum on Tue Sep 16th 2003 at 5:40pm

In fact, func_trains CAN have an origin brush, and it is sometimes useful. If you want the train to roll (like, oh...I don't know, a boulder maybe?) then you can set it's angular velocity using the avelocity key. The angular velocity will use the origin brush for it's centre of rotation.

This is not like the tracktrains "align to corners" rotation.
Post ReplyView Topic