Skip to content

Triggers

A trigger is an automatic reaction. When something happens, it can optionally ask someone, and then it runs effects. Without triggers, a scenario only changes when someone acts.

Some examples:

  • When someone checks in at a checkpoint, mark the checkpoint as visited.
  • Ten minutes after the scenario starts, close registration.
  • When a handover is proposed, ask the person receiving it to accept.
  • When the scenario starts, pair each person with a random partner.

To add one, open the template’s Definitions, tap New next to Triggers, and give it a name.

Attached to decides what watches for the event:

  • The whole scenario (the default): one trigger for the scenario.
  • Each entity of a template: every entity of that kind watches for the event on its own, and its effects can refer to it as the one it is about. Choose this when the reaction belongs to each entity, such as each checkpoint counting its own visits.

Pick what the trigger fires on:

When What it reacts to
An action is proposed Someone is about to do an action, before it happens. The only kind that can ask for a decision, or redirect or cancel the action
An action resolves, is cancelled or fails An action has finished; you pick which outcome
An entity’s attribute changes An attribute’s value changed on an entity
An entity gains or loses an attribute An attribute was added to or removed from an entity
A scenario attribute changes A scenario-wide value changed
A trait is applied, refreshed, removed or expires You pick which of those
A relationship is created or removed Two entities were linked or unlinked
Another trigger fires Another trigger you’ve made fired
Its own schedule expires A timer you set
Before the scenario starts The scenario is starting; see below
The scenario starts The scenario has just gone live. Runs once

The last two are only for triggers attached to the whole scenario.

Once you pick, When reads as a sentence, such as “When any attribute changes on any entity, Add a condition.” Tap a pill to change it (see Editing with sentences). To fire on something else, tap the event pill, such as changes, and pick under Fire on something else. For some kinds, the same card asks Which outcome, Which event, Which trait events or Which change.

Most kinds let you narrow it down: tap the pill such as any action or any attribute. Leave Any on to react to all of them, or turn it off and choose specific ones.

For a trigger attached to each entity, the sentence has two more pills:

  • Must the event involve this Checkpoint? For example By this Checkpoint (it’s the one acting), Aimed at this Checkpoint, or On this Checkpoint for its own attributes and traits. Anywhere (or On any entity) reacts to every matching event in the scenario.
  • Who it’s about: This Checkpoint itself, or An entity connected to it…. For a connected entity, choose the relationship under Through relationship, and which way the link goes.

A trigger can have two optional conditions:

  • Only when is the last pill of the When sentence: tap Add a condition. It’s checked against the event as it happened, for example “only when the value went above 10”.
  • Only if still true is under Then do. It’s checked just before the trigger fires, against how things are at that moment. If it’s false, the trigger is skipped and doesn’t count towards Fires at most.

A trigger can ask the person controlling an entity before it fires. This is only available for a trigger attached to each entity, on An action is proposed, where the entity is the one acting or the one the action is aimed at (By this … or Aimed at this …). The Decision card then appears.

Under How it resolves, choose Controller decision and set a Timeout of at least 30 seconds. The person sees Decision needed with Accept and Decline. If nobody answers in time, it’s declined. Declining doesn’t count towards Fires at most.

For Its own schedule expires, the sentence reads “When its schedule runs out after 1 minute”. Tap the schedule pill to set the Schedule:

  • One shot: fires once, After the time you set.
  • Repeating: fires Every interval you set. First after sets when it first fires; leave it empty to wait one interval.

Times are at least 1 second. Schedules use scenario time: they stop while the scenario is paused, and start counting when it starts.

If the engine falls behind decides what happens if more than one repeat is overdue at once: Catch up runs each one in turn, Coalesce (the default) fires once, and Skip moves on without firing.

Under Then do, add the effects the trigger runs. A trigger on An action is proposed can also redirect or cancel that action.

  • Armed to begin with: on by default. Turn it off for a trigger that should only start working when another trigger or action arms it, with the Arm or disarm effects. A trigger that starts disarmed and that nothing arms can’t be published.
  • Fires at most: how many times it can fire, then it stops for good. For a trigger attached to each entity, this counts per entity. Leave it empty for no limit.
  • Priority: when several triggers fire at once, higher numbers run first.

A Before the scenario starts trigger sets the scenario up as it starts. It runs once, before anything else, and is always armed.

  • It’s the only place you can pick things At random, for example to pair people up or hand out roles: use Do something for each entity in random order.
  • A Require something to be true effect here stops the scenario starting if it isn’t met.
  • It can change attributes, traits and relationships, and arm or disarm other triggers. It can’t perform actions, redirect or cancel them, or end the scenario.
  • If there are several, they run in priority order, and each sees what the earlier ones did.

Use The scenario starts instead for something that should happen once the scenario is live and shouldn’t be able to stop it starting.

A scenario can have up to 250 timers at once, and up to 64 decisions waiting for an answer. One trigger can fire up to 8 times in a single chain of events; see Limits.