Update Variable changes one or more variables when the action runs.
Use it for story flags, counters, settings, unlocks, and any other value that should change during the game.
Adding operations
To add a variable operation:
- Add an Update Variable action.
- Click
Add Operation. - Select a variable.
- Select an operation.
- Fill the value when the operation needs one.
- Click
Save Operation. - Add more operations if needed.
- Submit the action.
One Update Variable action can contain multiple operations.
Operations
The available operations depend on the variable type.
| Type | Available operations |
|---|---|
| String | Set to |
| Number | Set to, Increment by, Decrement by, Multiply by, Divide by |
| Boolean | Set to, Toggle |
Toggle does not need a value. It switches a boolean variable between true and false.
Usages
Update Variable can be used in the following places:
- Scene line actions.
- Controls.
- Layout editor interaction actions.