Variable Settings
You can set variables in Set Variable or when you write a Trigger.
Scope of Variables
Variables can be divided into Global Variables and Local Variables based on the scope type.
Global Variable can be used in any trigger of the editor.
Local Variable can be used in only the current trigger.
Attributes of Variables
You can set and name variables of various types to facilitate subsequent calling. For some variable types, the Default Value must be set.
Types of variables include Integer, Float, and Unit.
You can set the Default Value of a variable. After the assignment, the default value is overwritten.
An Array is a collection of data, being presented in the form of name [number], for example, unit array variables Boss[1] and Boss[2].
Characteristics of Variables
Variables can only store values at a certain time and are not updated in real-time. Do not forget to write statements in Trigger to update variables.
For example, when the game is running, you set the variable "Number of Players" to 6. Five minutes later, a player exits the game and the number of players in the game becomes 5. If no variable-update-statement is written, the variable "Number of Players" is still 6. You need to write the ECA that expresses "the number of players minus 1 when a player exits the game".