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.
Close something after a set time
Section titled “Close something after a set time”For example, registration closes 30 minutes after the start.
- Add a scenario attribute
Registration open: Scope Scenario, Type Boolean, Default True. - 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.
- In the
Registeraction, 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.
End the scenario on time
Section titled “End the scenario on time”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.
Repeat something
Section titled “Repeat something”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.
Limit how often someone can act
Section titled “Limit how often someone can act”Use a trait with a duration as a cool-down:
- Add a trait
Cooling downwith 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. - 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.
Use the time in a rule
Section titled “Use the time in a rule”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.
Things to know
Section titled “Things to know”- 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.