BETA — Preview build
Skip to content
Clear the value of every variable

Reset variables ​

Resets all variables from your profile in one go. Afterwards none of them has a value, just like right after you created them. This action has no settings.

How it works ​

  • Every variable from your profile is reset, not only the ones the script uses.
  • A reset variable has no value. A condition that checks whether it equals a value is not met for any value, and Increase by 1 starts again from 0.
  • Scripts with a variable execution event are not started by a reset: they wait for a specific value, and a reset variable has none.
  • The execution log shows how many variables were reset.

TIP

To reset only one variable, or to give it a specific starting value, use Set variable with Set to value. A single variable can also be reset by hand from its item on the layout.

Example ​

A timetable counts how many trains have passed through the station with the variable Trains passed, and a staging yard counts its parked trains in Yard trains. At the start of every operating session, a "Start session" script runs Reset variables, so all counters start fresh.