Variables
Create and manage the named numeric values your playable tracks, like score, health, and moves.
A variable is a named numeric value that your playable tracks while it runs. Score, health, moves, coins collected, questions answered: if you want to count it, it's a variable.
Variables live in the Variables tab of the Progression section. Every new project starts with one template variable: Variable 1, starting at 0. You can rename it, repurpose it, or remove it, and you can add as many of your own as you need.
Adding a Variable
Click the + button in the Progression header while on the Variables tab. A new variable is added to the list.
Each variable has two fields:
Name identifies the variable everywhere it's referenced: in triggers, in the Update Progression action, and in component tracking dropdowns. Names can be up to 20 characters.
Start Value is the value the variable begins at when the playable loads. Defaults to 0.
There's no limit on the number of variables you can create.
Removing a Variable
Click the minus button on a variable to remove it. Two things to keep in mind:
Any trigger that referenced the removed variable will display (Deleted) in its variable field. The trigger stays in your list but won't fire until you point it at another variable.
Where Variables Are Used
Defining a variable does nothing on its own. It becomes useful when other systems reference it:
Update Progression actions change a variable's value when they fire.
Triggers watch a variable and fire an action when it meets a condition.
Progress Bar and Progress Text components can track a variable to display it to the player.
Game Variables
Game Mechanic layers own their own counters (Score, and Moves or Health in the games that have them) and list their scoring values in the Progression section when the layer is selected. These are fixed by the mechanic: you can edit the values, but you can't add, remove, or rename them. See the Progression overview for how game progression differs, and each game mechanic's page for what its variables control.
Last updated