Skip to main content

Triggers & Targets

This page provides an overview of triggers and targets in map building. It explains how triggers can activate various entities, known as targets, and details common types and properties of both triggers and targets. Additionally, it includes a step-by-step guide on adding a trigger and target to a map.

Many different types of entities can be activated by a trigger. For example, you could trigger a light to turn off when the player enters a room or you could trigger a mover to start moving when a player activates a button.

In these examples, the light and the mover are called targets.

Common Target Types​


There are many additional target types located under New Entity → Target. Listed below are some of the more common target entities that can be used to create intricate logic and gameplay.

Target NameDescription
change_colorUsed to change the color of a light or dynamic model. An example is used in the Add a Door to a Map section of the Interacts page.
hideUsed to hide an entity.
relayUseful for adding a delay into the trigger/target logic.
showUsed to show a hidden entity.
spawnSpawns an AI.
teleportTeleports an entity to a given location.

Common Trigger Properties​


These common trigger properties can help you define the trigger's behavior:

Trigger PropertyDescription
WaitThe number of seconds that the trigger will wait before activating again. This property is useful on triggers that can be activated multiple times. This keeps the trigger from activating a target before the target is ready again.
DelayThe number of seconds the trigger will delay activating the target. This can be useful for sequencing events.
Trigger OnceEnabled for triggers that will activate only once. Disabled for triggers that can be activated many times, like a teleporter.

Add a Trigger and Target to a Map​


The most basic trigger will activate when a player touches the trigger volume.

  1. In your map, in World Editor, right-click to open the context menu.

  2. Go to New entity → Trigger → Trigger.

  3. Resize and place the trigger in the desired area of your map.

  4. Add a target entity to the map.

  5. Deselect everything.

  6. Select the trigger and select the target. Then connect the two using Ctrl+K.

    info

    Doing this will add the target to the Targets List property on the trigger entity. Any number of targets can be added to a trigger.