Events and Listeners

The other two buttons on the left hand side are for the Events and Listeners on the object. These allow you to make specific actions happen as a result of things in-game.

For example, you could make a lever you need to pull or a set of enemies you need to kill in order to open a gate to enter the next room.

Event Broadcasters

To create a set of actions like this, you first need to set up an Event Broadcaster.

Start by clicking the Events button on the object you want to trigger something else (for example, if you want a lever to open a gate, select the lever then choose "Events")

First you need to choose the Event Type - you can see a list of event types for each object here.

This example will use the "OnPull" event for a lever - the event that is broadcast when the lever is pulled - to make the lever open a gate.

Next, you need to specify a Name for the event - this is what your Listener will 'receive' later. This can be any piece of text, so it's recommended you name it something descriptive but not too long.

Finally, click the + button to add the event to your object, then place it down. You can use the - button to remove an event if you made a mistake.

Just like configuration options, make sure to set up all events on your objects before you place them down.

Listener Actions

Once your broadcaster is set up, you need to create the object that will receive the event, and do something as a result.

First, select the object you want to attach a listener to, then select the "Listeners" tab on the right hand side. Continuing with the example of a lever that opens a gate, we'll use a gate that receives our broadcast and then opens.

Set the "Name" to the same name you specified in the broadcaster (in this example that was "Door1"), then set "Trigger" to the action you want the object to do.

For this example the action is "open", but you can see a full list of actions here.

You can also change the "Times" option to a different number, which will require the event to be broadcast a set number of times in order to perform the specified action.

This is good for arenas where you want the player to defeat more than just one enemy, or if you want to make a level that requires multiple levers being pulled in order to proceed.

Once your listener is ready, you can once again press the + button to add it to your object, then place down the object wherever you want it.

Event Types

Levers:

  • OnPull - When the lever is pulled, or when the room loads with the lever already pulled.

    • This is useful for things like doors where you want the door to stay open once you pull the lever.

  • FirstPull - When the lever is pulled.

  • LoadedPulled - When the room loads when the lever is already pulled.

Enemies:

  • OnDeath - When the enemy dies or when the room loads with the enemy already dead.

  • FirstDeath - When the enemy dies.

  • LoadedDead - Room loaded and the enemy was already dead.

  • OnDamage - When the enemy takes damage.

Trigger Zones:

  • ZoneEnter - When the object enters the zone.

  • ZoneExit - When the object leaves the zone.

    • If you're using a trigger zone for things like arenas, make sure to disable them once they've been triggered, or else you'll encounter issues with them calling the event again when the arena has already begun.

Zote Head:

  • Land - When the head lands on the ground.

  • InAir - When the head leaves the ground.

  • OnHit - When the head is hit with the nail.

Bindings:

  • OnBind - When the binding is activated by the player touching it.

  • OnUnbind - When the binding is deactivated by the player touching it.

Toll:

  • OnPay - When the toll is paid, or when the room loads and the price was already paid.

  • FirstPay - When the toll is paid.

  • LoadedPaid - When the room loads and the toll was already paid.

Timer + Relay:

  • OnCall - When the object's event is called.

    • If the Multiplayer Relay setting is enabled on a Relay object, events broadcast in the OnCall event are also broadcast over multiplayer.

Key Listener:

  • KeyPressed - When the key is pressed/held/released, depending on the setting.

Breakable Decorations:

  • OnBreak - When the decoration is broken.

Player Hook:

  • Various player actions

    • OnDamage

    • OnHeal

    • OnHazardRespawn

    • OnDeath

    • Jump

    • WallJump

    • DoubleJump

    • Land

    • HardLand

    • FaceLeft

    • FaceRight

    • Attack

    • Dash

    • CrystalDash

    • Spirit

    • Dive

    • Wraiths

Action Types

General:

  • Enable - Enables the object (enables it if it is disabled)

  • Disable - Disables the object (disables it if it is enabled)

Visible:

  • Show - Shows the object (makes it visible if invisible)

  • Hide - Hides the object (makes it invisible if visible)

Gates:

  • Open - Opens the gate

Battle Gate + White Palace Shield Gate:

  • Close - Closes the gate

Enemies:

  • Die - Kills the enemy

Awakable Bosses:

  • Wake - Wakes up the boss

Teleport Point:

  • Teleport - Teleports the player to this point

Hazard Respawn Point:

  • SetSpawn - Sets the player's Hazard Respawn Point to this object

Relay:

  • Call - Calls the Relay's event

  • Enable_Relay - Enables the Relay

  • Disable_Relay - Disables the Relay

    • If a Relay has an ID set, this enabled or disabled state is shared across all Relays

Text Display:

  • Display - Displays the text

Object Mover:

  • Move - Moves the object

Object Duplicator:

  • Duplicate - Duplicates the object

Crushers:

  • Start - Starts the movement

  • Stop - Stops the movement when the crusher reaches the top

  • StopImmediate - Immediately stops the movement

Jelly Egg Bomb:

  • Respawn_Egg - Respawns the egg bomb after exploding (object must be enabled)

Player Hook:

  • Kill_Player - Kills the player instantly

  • Damage_Player - Damages the player as if hitting an enemy

  • Hazard_Player - Damages the player as if touching a hazard such as spikes

  • Heal_Player - Heals the player by 1 mask

  • Full_Heal_Player - Heals the player to max health

Further Support

If you are unsure about anything, you can ask for help in the Starshooter discord server.

Last updated