This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
usage:atlatc:api [2021-04-28 14:28] orwell since version 2.3.0 |
usage:atlatc:api [2022-06-25 14:35] 56independent subway trains No longer part of advtrains |
||
---|---|---|---|
Line 240: | Line 240: | ||
Sets the line property of the train, as a string. | Sets the line property of the train, as a string. | ||
- | On [[usage: | + | On [[usage: |
If there is no train, same behavior as [[# | If there is no train, same behavior as [[# | ||
Line 253: | Line 253: | ||
If there is no train, same behavior as [[# | If there is no train, same behavior as [[# | ||
+ | |||
+ | === train_length() === | ||
+ | Returns the number of wagons in a train. | ||
=== set_shunt() === | === set_shunt() === | ||
Line 279: | Line 282: | ||
* This function is available only when the [[wiki: | * This function is available only when the [[wiki: | ||
* This function is only accessible during '' | * This function is only accessible during '' | ||
+ | |||
+ | === set_autocouple() === | ||
+ | |||
+ | Enables Autocouple mode. When the train hits another standing train, it couples to it and continues with its current ATC target speed in the same direction. | ||
+ | |||
+ | In contrast to the '' | ||
+ | |||
+ | //since version 2.4.0:// | ||
+ | |||
+ | The train that is initiating the coupling (that is, the train that is driving and whose mode is set to autocouple) is guaranteed to retain its Train ID. | ||
+ | |||
+ | === unset_autocouple() === | ||
+ | |||
+ | Disables the Autocouple mode. | ||
==== Fields ==== | ==== Fields ==== |