Skip to main content

Train States

Trains have 7 states. 6 of which are used in game code.

StateDescription
0Moving
1Stopping at station / Slowing down for station
2Opening doors
3Stopped / Stopped at station
4Doors closing
5Leaving state
6Stopped but instantly

Known flaws

  • If a train hasn't come to a complete stop when entering a station (5 units of the stop), the train will skip past the station. Game code takes control of speed, keeping it at the max speed defined in tracks.xml. If the train speed (not cruise speed) ever reaches below 0.05 units/second, the train stops and enters state 3. It will rarely change to state 4 (to resume the state system back to 0) due to a check requiring the player to be on the train and 30 seconds to have passed since the state was set.

  • Game code will force the train's max speed (not cruise speed) to be the track's max_speed, only if flag 4 (stopsAtStations) is set. A fix for this should be merged onto canary soon.