Func tracktrain: Difference between revisions
Karl-police (talk | contribs) No edit summary |
Dr. Orange (talk | contribs) (Re-added code class note with links to the official Valve github) |
||
Line 5: | Line 5: | ||
{{note|It seems that fast speed can skip or cause problems while traveling through path_tracks, depending on how far they are from eachother, this is due to the tickrate.}} | {{note|It seems that fast speed can skip or cause problems while traveling through path_tracks, depending on how far they are from eachother, this is due to the tickrate.}} | ||
{{Code class|[https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/game/server/trains.cpp#L1246 CFuncTrackTrain]|[https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/game/server/trains.cpp trains.cpp]}} | |||
== Keyvalues == | == Keyvalues == |
Revision as of 03:20, 4 August 2018
Template:Base brush It functions as a moving platform that the player can ride. It follows a path of path_track entities.


path_track
on the path.

CFuncTrackTrain
class, defined in thetrains.cpp
file.
Keyvalues
Distance between wheels is the distance in Hammer Units between the front axle and rear axle of your train. The rear axle moves the train and stays on the track. The front axle turns as it approaches path_tracks and does not stay on the track.
Flags
Inputs
Backward movement
Due to coding errors or engine limitations, the Reverse and StartBackward may not function correctly if the "New Train Speed" property in the involved path_track entities is set to 0. The train may fail to reverse, jamming in place or moving in the wrong direction. To solve this issue, some or all of the path_tracks
must have their "New Train Speed" variable set to a nonzero value.