- are stored in memory for as long as a scene is active
- can only be accessed from within the current scene
They're useful for storing data that doesn't need to be shared between different scenes, such as the number of enemies in the scene. They're deleted from memory when the player changes scenes.
Creating scene variables
- Open the Scene editor.
- Right click on the scene.
- Select Scene properties.
- Select Edit scene variables.
- Click Add.
- Enter a name for the variable.
- (Optional) Enter a default value for the variable.
- Select Apply.
Variable names should not contain dots (periods) or commas. We recommend using alphanumerical characters.
Using scene variables in expressions
You can use scene variables in expressions. The syntax depends on the data type of the variable. In the examples below, replace the placeholders in angled brackets with the relevant values.