Skip to content

Dialog and Interactions

In this tutorial, we’ll see how to add dialog - the bread and butter of story-driven games. We’ll create the dialog and implement a player interact trigger to play the dialog.

Showing Dialog

The Dialog event shows text in a dialog box in the game.

Adding Dialog

  1. Navigate to Maps > Map 1 > Events.

  2. Click + Event and add the Dialog event.

  3. In the event configuration:
    Paste the following dialog text:

    Hello World!
    Welcome to my game.
  4. Navigate to Play test and we should see the dialog play after the other events finish.
    Press Enter or X to play the next dialog.

Adding an Interaction

Our current set up will play the dialog event when the map loads. But what if we want to play dialog when the player interacts with something? To do this, let’s add an event group.

How Event Groups Work

Event groups are a group of events separate from the map’s initial events which play on map load. To play the event group’s events, we must add it to the map with the Add event group event. Once added to the map, they can be triggered by player Interact or Touch.

Event groups is the feature that allows for multiple endings, dynamic interactions, and puzzles. Learn more about how event groups work.

New Event Group

  1. Navigate to Maps > Map 1 > Events at the Event groups section.

  2. Click + Create event group.

  3. Click the name to rename the event group as “Talking tree.”

  4. Add a new dialog event in the event group:
    Paste the following dialog text:

    This is the tree talking.
  5. Under the Map Events section
    Add an event and choose the Add event group event (see image below).

    • Select Talking tree for the event group to play.
    • Set the trigger type to interact.
    • Set the trigger position to a tree in the map.

Keep in mind, since events play one after another, the event group will not be added until the other events are finished playing.

Now head over to Play test and use Arrow keys or WASD to walk up to the tree. When we press Enter or X, we should see the dialog play.