Select vehicle
Sets the active vehicle of the script. All vehicle actions that follow, such as set speed or set function, control this vehicle. Conditions that refer to "the selected vehicle" use it too.
Settings
| Setting | Description |
|---|---|
| Vehicle | The vehicle from your vehicles list. Its address, speed steps and flags are taken from the vehicle automatically. |
If you turned on Enable non linked entries in the advanced options of your profile, you can switch the action to manual and enter the vehicle yourself:
| Setting | Description |
|---|---|
| Address | The DCC address of the vehicle. |
| Speedsteps | The speed steps of the decoder (14, 28 or 128). |
| Name | Optional. The name shown in the script editor and the execution log. |
| Flags | The flags that are active while this vehicle is selected. |
Picking a vehicle from the list is recommended: when you change a vehicle's address or flags later, every script follows automatically.
How it works
- A script controls one vehicle at a time. Selecting a new vehicle releases the previously selected one.
- The flags of the selected vehicle are active as long as it is selected. They are combined with global flags and script flags.
- A script that is started by another script with Execute script shares the selected vehicle with the script that started it.
- When the selected vehicle no longer exists in your profile, no vehicle is selected and the vehicle actions after it do nothing.
TIP
For scripts that should work with whichever train arrives at a sensor, use Select from feedback instead.

