Skip to content

Timers and countdowns

Timers in ActualityPI run on scenario time: they start counting when the scenario starts, and stop while it’s paused. Use them to open and close stages, end on time, or slow things down.

For example, registration closes 30 minutes after the start.

  1. Add a scenario attribute Registration open: Scope Scenario, Type Boolean, Default True.
  2. Add a trigger on Its own schedule expires. Tap its schedule, choose One shot and set After to 30 minutes. Add the effect Change a scenario attribute so it reads Set the scenario’s Registration open to false.
  3. In the Register action, tap Anyone, which asks Who may use Register? Change the clause to compares a value, and make it read the scenario’s Registration open is true: for its left side, choose Scenario attribute under Use something else.

After 30 minutes, nobody can use Register. On an entity’s page it shows Doesn’t meet who may use it.

Add a trigger on Its own schedule expires, One shot, After the length of the scenario, with the effect Complete the scenario. The scenario ends once anything in progress has finished.

Choose a Repeating schedule, such as Every 10 minutes, for something that should happen regularly: topping up a value, opening the next stage, or applying a trait to everyone.

Use a trait with a duration as a cool-down:

  1. Add a trait Cooling down with a Default duration of 2 minutes. Under Blocks these actions, tap Add block, change Which actions from Every action to Only these, and choose the action under Blocked actions.
  2. In the action, add the effect Apply a trait so it reads Give Cooling down to the performer.

After using the action, a person can’t use it again for 2 minutes. On their entity’s page it shows Blocked by Cooling down until then.

In any condition, add a compares a value clause and, for its left side, choose Elapsed scenario time under Use something else. It reads the time since the start. Compare it with a duration, such as is below 10 minutes for the first 10 minutes, to make something depend on how long the scenario has been running.

  • Times are at least 1 second.
  • Timers don’t run while the scenario is being prepared or while it’s paused.
  • A scenario can have up to 250 timers at once.