Events and control flow Reference
GDevelop comes with a set of events and conditions that allow to express the game logic and rules. Read more explanations about it.
Conditions
And
Checks if all sub-conditions are true. If no sub-condition is specified, it will always be false. This is rarely needed, as events already check all conditions before running actions.
See parameters & details
There are no parameters to set for this condition.
Technical note: this condition internal type (in GDevelop JSON) is
BuiltinCommonInstructions::And.
Compare two numbers
Compare the two numbers.
See parameters & details
- Parameter 0 (🔢 Number): First expression
- Parameter 1: 🟰 Relational operator
- Parameter 2 (🔢 Number): Second expression
Technical note: this condition internal type (in GDevelop JSON) is
BuiltinCommonInstructions::CompareNumbers.
Compare two strings
Compare the two strings.
See parameters & details
- Parameter 0 (🔤 String): First string expression
- Parameter 1: 🟰 Relational operator
- Parameter 2 (🔤 String): Second string expression
Technical note: this condition internal type (in GDevelop JSON) is
BuiltinCommonInstructions::CompareStrings.
Not
Returns the opposite of the sub-condition(s) result. This is rarely needed, as most conditions can be inverted or expressed more simply.
See parameters & details
There are no parameters to set for this condition.
Technical note: this condition internal type (in GDevelop JSON) is
BuiltinCommonInstructions::Not.
Trigger once while true
Run the actions once when the previous conditions are true. If they become false and later true again, the actions will run again.
This condition is always last in the list.
Note: internally, this uses a global trigger state; it's not tracked per object instance. Be careful if you use this in a loop or For Each event (consider using object variables instead if needed).
See parameters & details
There are no parameters to set for this condition.
Technical note: this condition internal type (in GDevelop JSON) is
BuiltinCommonInstructions::Once.
Or
Checks if at least one sub-condition is true. If no sub-condition is specified, it will always be false. This is rarely used — multiple events and sub-events are usually a better approach.
See parameters & details
There are no parameters to set for this condition.
Technical note: this condition internal type (in GDevelop JSON) is
BuiltinCommonInstructions::Or.
The Events and control flow extension is always installed in all GDevelop projects: there is no need to add it from the Project Manager.
This page is an auto-generated reference page about the Events and control flow feature of GDevelop, the open-source, AI-powered, cross-platform game engine designed for everyone. Learn more about all GDevelop features here.