Variables
Variable is a named storage for some known or unknown value. The value can be changed in your program (varies, hence the name).
Creating Variables
Variables can be created in several different ways:
- You may create a variable by clicking the button Create variable... and choosing any name for it. The name, wherever it appears in the program, can be changed via the variable's dropdown menu any time later.
- Procedures can define inputs, which creates variables that can be used only within the procedure. These are traditionally called parameters or arguments.
- Every "count with" and "for each" puzzle uses a variable and defines its values. These values can only be used within the puzzle.
A typical use case for variable is when you have an object that can be in several states. For example, a door can be open or closed, and if you want to animate it properly you need to know in which exactly status it is now.
Puzzles Reference
set
This puzzle assigns a value to a variable.
get
This puzzle provides the value stored in a variable, without changing it.
change
Increments the value stored in a variable by a specified number. If the initial value is not numeric, or not set, then it is considered to be zero which is incremented.
Having Troubles with Puzzles?
Seek help on the forums!