SHIP:Property:timer:alarm

From Serious Documentation
Jump to: navigation, search

Node: timer

Property Data Type Description
alarm* Boolean Set to true at run-time when a timer's count value transitions from 1 to 0.

The timer alarm property is set true by SHIPEngine at run-time when a timer's count value transitions from 1 to 0.

A Sail script cannot set this property to true (attempts will have no effect), nor can it be set true in SHIPTide. It is a run-time only property.

The only way to clear the alarm property is for a Sail script to set this property to false.

An example of a typical timer alarm listener-script pair is:

Example timer alarm listener


Two things to note about this example.

First, the addition of shiplaunch to the listeningto property ensures the timer is enabled and set up correctly when the GUI first starts.

Second, the condition of animationTimer.alarm ensures the listener wakes only when the alarm goes true. Omitting this condition will cause the listener to wake also when the alarm is cleared: an undesirable recursion since it is this script that resets the alarm!