Events

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.

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 move 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 Javacript code). Sub-events are triggered only after the parent event's actions has been executed. If the conditions of the parent event are false, then no sub-event is executed.

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 after click the add sub-event button You can find all the available options by clicking the plus icon

Add conditions and Actions

After add an event we are going to find a blank event in our editor

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, then we can choose from many options sorted in to different categories.

In order to learn more about how to use the different conditions and actions, I recommend to read the tutorials and guides available on the wiki: GDevelop 5 tutorials