Skip to content

The Event System

The event system in Pixel Stories is a powerful and flexible tool that enables developers to create dynamic and interactive gameplay experiences. Events are the core mechanisms through which the game world responds to player actions, drives the narrative, and adds interactivity.

Events in Pixel Stories

The following are the current Pixel Stories events divided into the following categories:

  • Essentials
    • Dialog
    • Timer
  • Player
    • Transfer player
    • Set player position
  • Actors
    • Spawn actor
    • Remove actor
    • Move actor
  • Control flow
    • Add event group
    • Remove event group
    • Set variable
  • Music/sound
    • Play sound
    • Set background music
    • Stop background music

How Events Work

Events are the building blocks that control what happens in your game. When a player first enters a map, the map runs the initial set of events. These events can include actions like showing a dialog, moving an actor, or starting a wait timer.

Event Groups

Event groups are a group of events separate from the map’s initial events.

Example Event Group:

How Group Events Work

The map’s initial events play one after another when the map loads. To play the event group’s events, we must add it to the map with the Add event group event. When it’s time to remove the event group from the map, we can use the Remove event group event.

When an event group is added with the Add event group event, they can be triggered via:

  • Interact, the player is next to event group and presses Enter or X to trigger it.
  • Touch, the player walks up to the event group tile.
  • None, event group plays immediately when added.

Imagine a map having many event groups. With this system, it’s possible to build puzzles, dynamic interactions, and interesting story game mechanics.

The follow is a sketch of a map which has several event groups added in:

Table of Events

Below is the table of all the current events and a brief description:

Event NameDescription
DialogCreate and manage conversations between characters.
TimerTrigger actions after a set time interval.
Transfer playerTransfer the player to a different map
Set Player PositionChange the player’s location within the map.
Spawn ActorIntroduce new characters or objects into the game world.
Remove ActorRemove characters or objects from the game world.
Move ActorControl the movement of characters or objects.
Add Event GroupBundle multiple events into a sequential group.
Remove Event GroupDelete a previously defined group of events.
Set VariableModify game variables to influence gameplay.
Play soundPlays a sound
Set background musicSet the background music to a music track
Stop background musicStop the background music if any is playing