Timing
While creating an automation script for your locomotive you sometimes will have a situation you want to wait for the train to arrive at a certain station or you want your train to drive for a certain amounts of seconds. Model Train Scripts provides you actions for both options.
Wait
The wait action will pause the script execution for the configured amount of time.
Although you can never prevent the use of this action do try to minimize the usage as much as possible and try to relay on sensors. Due to the mechanical engine and things timing of sound effects of your locomotive you cannot guarantee the precise location of your train after the wait.
We recommend you use the "Wait for condition" action as much as possible for more reliable execution.
Wait for condition
With this action you can wait for any condition of your layout to become true. Conditions can be defined for (layout) accessories, feedback sensors, vehicle state or flag state.
This is a particulary powerful action that can help you avoid time based scripts. For example you can add a wait for condition on a feedback sensor to let your train stop.
Last updated
Was this helpful?