Variables
Variables are small pieces of data that your game uses to remember things, like whether a door is unlocked or how much health the player has, etc.
You can think of a variable as a labeled box that holds a number.
The variables are what is called a s16 or Short 16, which can hold values from -32,768 to 32,767.
All variables have a default value of 0 or false, any value different than that becomes true.
Variable Types
You have three types of variables, Globals, Locals, and Temporary variables.
All types of variables share the same values limits.
Global Variables
You can have 1024 different global variables on your game.
They can be accessed from all Actors, Triggers, Scene scripts.
Global variables values are persisted across scene changes.
Local Variables
You can have 16 different local variables per Actor, Trigger, or Scene.
Local variables values are reset to 0 when changing scenes. This is done to reduce the amount of used RAM in the game.
Temporary Variables
You can have 16 different temporary variables.
They are useful to do loop indexing, or get return information from different events.
Their value can't be assured and should always be reset before using, even inside a loop if you have any async events their value may have changed.