Timers and Counters

Learn how timers and counters can be used to automate an interactive environment.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

There are two metric based objects that can be created in the trigger app. Counters store a number that can be incremented or set to any integer (non decimal). Timers track elapsed time while active. For each of these objects there is an editor, an event and an action. You can add the data stored in any timer or counter to the description field of a dialog menu by entering in the name of the counter incapsulated in quotations. For example if your timer is named Total Time Elapsed a dialog menu description with “Total Time Elapsed” entered in its field is replaced with the value stored in the Total Time Elapsed Timer when the dialog is displayed.

The Trigger Timers Manager displays all of the Timers in your project. The name of each timer appears next to a time stamp. Both these fields can be edited by double clicking the field.

Timers are created in using the Create button located in the associated events and actions.

The Timer action allows you to control the state of the timer when triggered. The following Action options are applied to the selected timer.

Start : Continues recording elapsed time from the current value.

Pause : Ceases recording elapsed time keeping the current value.

Toggle :Toggles recording elapsed time keeping the current value.

Reset : Ceases recording elapsed resetting the value to 0.

Restart : Continues recording elapsed resetting the value to 0.

Timer Events are used to trigger an action when the timer value reaches the time in the given value

The Trigger Counters Manager displays all of the Counters in your project. The name of each counter appears next to a value. Both these values can be edited by double clicking the field.

Counters are created in using the Create button located in the associated events and actions. An additional Counter event can be used with Sliders in the custom dialog.

The Counter action allows you to Increment, Decrement or set the counter value.

The Increment / Decrement option counter value to the sum of the given value and the counter value. A +5 adds five to the counter. A -5 subtracts five from the counter

The Set Value option sets the counter value to the given value.

The Count Independently option toggles whether triggers with multiple event rules apply the change in value for each event that meets the condition when multiple events in the same trigger occur at the same time.

The Counter event triggers can have three types of comparisons.

The Greater Or Equal option triggers associated actions when the counter value is greater than or equal to the given value

The Less Or Equal option triggers associated actions when the counter value is less than or euqal to the given value.

The Equals option triggers associated actions when the counter value is equal to the given value.