Global Name Variables¶
Global Name Variables are variables identified by a unique string of characters that live outside the scene and can be accessed and modified from anywhere.
Creating a Global Name Variable¶
To create a Global Name Variable, right click on the Project Panel and select Create → Game Creator → Variables → Name Variables. A new asset will appear in the project panel, which can be used to define each of the variables contained within.
Note that two Global Variables can't have the same unique ID. Otherwise they'll override each other's values. To generate a new unique ID, expand the ID field and click the "Regenerate" button.
Adding new entries¶
To add a new variable entry, type the name of the variable on the creation field and press enter (or click on the little [+] button).
The name of a variable can be modified, as well as its value type. The Value field also contains the starting value of this particular variable entry.
Save & Load
Vales can be saved between play sessions to later be restored when loading a game. Disabling the save option will make all variables keep the initial value as their starting value, even after loading a previously saved game.