Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameTypeRangeShort description
TrackSpeedsint[48][ -255 , 255 ]The speed per track. Track names can be used as indices. (e.g. KH_ST_0)
Pointsint[30]{BRANCH, STRAIGHT}The numbered values of the switchable intersection points. (e.g. 23)
TrackSignalsbool[40][2]{true, false}The signals on each track. If the track contains signals it's always two. Track names can be used as indices. (e.g. KH_ST_1)

Outputs

NameTypeRangeShort description
TrainPositionsint[15][ 0 , 47 ]The position, that a given train currently occupies. (e.g. Train TRAIN_KH_ST_0 occupies KH_ST_0 on startup)
TrainSpeedsint[15][  -255 ,  255 ]The speed, that a given train currently occupies (e.g. Train TRAIN_KH_ST_0 has speed 100)
TrackConnections
ForwardNext
bool
int[48][5][ 0, 48 ] (-1 means invalid)The next lines in the main direction. Each track can have at most 5 possible lines. -1 for all entries, that are not valid lines. (e.g. ForwardNext[KH_ST_1][0] == KH_ST_6, ForwardNext[KH_ST_1]
TrackConnections[ i ][ j ] → whether or not track i is directly connected to track j in the travel direction allowed by track i
[1] == -1,...)
ReverseNextint[48][5][ 0, 48 ] (-1 means invalid)Same behaviour as ForwardNext, but in the secondary direction. If the secondary direction is not permitted all values are -1.
Errorstring
Error messages. (e.g. If a required track signal did not trigger)

Requirements

For two directly connected Tracks the IDs of the Points that need to be passed (if any) including their direction (branch, straight).

...