Events in GDevelop allow you to visually program your game without any prior programming knowledge or experience, so anyone with any background will be able to create the actual gameplay and allow players to interact with the game.

Even for experienced programmers, events are fast to write and read. They allow artists, designers, level designers and anyone working on the game to understand and update the rules of the game.

Event types

There are different type of events in GDevelop that can be used for different purposes:

  • Standard event: this event is the default one and is triggered every single frame. It executes the actions once the conditions are true, then moves on to the next event.
  • For Each event: this event is triggered for each and every instance of the selected object, checks the conditions, and then executes the actions for each individually before moving to the next event.
  • Repeat event: this event is repeated the specified number of times before moving on to the next event.
  • While event: this event is repeated continuously while the specified conditions are met and moves on to the next event only after the conditions of this event are no longer true.
  • Comments: these events are used to add comments or explanations into an event sheet - they won't change anything during the game.
  • Link: This event allows you to call the specified external event. External events are events that are not linked to a specified scene. You can call and execute them from one or more scenes using Link events.
  • Group: A group contains one or more events. It's an easy way to organize your events into sections. You can collapse the content of the group to hide the events you're not interested in when working.
  • JavaScript event: this event allows you to use JavaScript code along with other events

Events can have sub-events (except for Links, Comments and JavaScript code). Sub-events are triggered only after the parent event's actions have been executed. If the conditions of the parent event are false, then no sub-event is executed.

Finally, advanced users can create their own actions and conditions using functions. It's a way to make your events even more modular and adapted to your game.

Add events

In order to add events to our game, first, we need to switch to the event editor. We can do that using the event tab next to our scene tab.

After that, we can find the tools on the top to add events. As the standard and sub-events are the most often used type of events, we have a quick button to use on the top. To add standard event we can use the add event button To add sub-events, first, we need to select an event in the editor and later, click the add sub-event button. You can find all the available options by clicking the plus icon.

Add conditions and actions

An event comprises of conditions and actions. When the specified condition(s) are met, the corresponding action(s) take place. When an event is added in the editor, it is blank (no conditions and no actions):

We can add any number of conditions and actions to each event.

To add conditions and actions, we need to click add condition and add action inside the event respectively, then we can choose from a number of options, sorted in different categories.

In order to learn more about how to use the different conditions and actions, we recommend reading the tutorials and guides available on the wiki.

You can also create your own conditions and actions using functions.

Search/Replace in the event editor

Sometimes, searching for an event in the event sheet can be cumbersome. For this, you can use the search feature. To search within the event sheet, you can either click on the “Search in events” button or press Ctrl + F.

To search for a keyword, enter the keyword in the search bar at the bottom of the window and click on “SEARCH”.

You will see the total number of matches at the bottom of the bar. To switch between the results, use the arrow keys beside the number of results.

If you want the search to be case sensitive, untick the “Case insensitive” option.

You can also filter the search results to either search only within actions or conditions or both.

To replace the instances of a text with another text, enter the text to be replaced in the “Text to search” field and in the “Text to replace” field, enter the new text. Clicking on the “REPLACE” button will replace all the instances of the text in the search field.