Variable features

Actions, conditions and expressions to handle variables, from simple variables like the player score, the number of remaining lives to complex variables containing arbitrary data like an inventory or the result of a web request. Read more explanations about it.

Actions

Clear global variable
Remove all the children from the global variable.

Append variable to a global array
Appends a variable at the end of a global array variable.

Append a boolean to a global array
Appends a boolean at the end of a global array variable.

Append a number to a global array
Appends a number at the end of a global array variable.

Append a string to a global array
Appends a string at the end of a global array variable.

Remove variable from a global array (by index)
Removes a variable at the specified index of a global array variable.

Remove a child
Remove a child from a global variable.

Value of a global variable
Change the value of a global variable

String of a global variable
Modify the text of a global variable.

Value of a scene variable
Change the value of a scene variable.

String of a scene variable
Modify the text of a scene variable.

Append variable to a scene array
Appends a variable at the end of a scene array variable.

Append a boolean to a scene array
Appends a boolean at the end of a scene array variable.

Append a number to a scene array
Appends a number at the end of a scene array variable.

Append a string to a scene array
Appends a string at the end of a scene array variable.

Remove variable from a scene array (by index)
Removes a variable at the specified index of a scene array variable.

Boolean value of a global variable
Modify the boolean value of a global variable.

Boolean value of a scene variable
Modify the boolean value of a scene variable.

Toggle boolean value of a global variable
Toggle the boolean value of a global variable.
If it was true, it will become false, and if it was false it will become true.

Toggle boolean value of a scene variable
Toggle the boolean value of a scene variable.
If it was true, it will become false, and if it was false it will become true.

Clear scene variable
Remove all the children from the scene variable.

Remove a child
Remove a child from a scene variable.

Conditions

Boolean value of a global variable
Compare the boolean value of a global variable.

Child existence
Check if the specified child of the global variable exists.

Boolean value of a scene variable
Compare the boolean value of a scene variable.

Value of a global variable
Compare the value of a global variable.

Text of a global variable
Compare the text of a global variable.

Value of a scene variable
Compare the value of a scene variable.

Text of a scene variable
Compare the text of a scene variable.

Child existence
Check if the specified child of the scene variable exists.

Expressions

Expression Description
GlobalVariable(globalvar) Value of a global variable
globalvar Name of the global variable
GlobalVariableChildCount(globalvar) Number of children of a global variable
globalvar Variable
GlobalVariableString(globalvar) Text of a global variable
globalvar Variable
Variable(scenevar) Value of a scene variable
scenevar Variable
VariableChildCount(scenevar) Number of children of a scene variable
scenevar Variable
VariableString(scenevar) Text of a scene variable
scenevar Variable

This page is an auto-generated reference page about the Variable features feature of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop features here.