» Back To Index
The <timer> node
The timer node makes it possible to set up an entity (the TIMER) which starts an event at
regular intervals. Generally the event is a LUA scripting code.
is the xml tag that defines a timer node.
- name - [STR127] - name of the node. This name will make it possible to refer this node throughout
the XML script.
- active - [BOOLEAN] - enables (TRUE) or disables (FALSE) the timer - default value: TRUE
- script - [STR255] - location of the script timer to be executed at each timer time-out. The site
relates to the xml script. This name can also refer to an already existing LUA script in the XML code.
- time_out - [INTEGER] - time of the timer in milliseconds. As soon as the time corresponding to the time-out is
passed, the script that is specified within the script attribute is executed - default value: 1000
<timer name="timer02" script="on_timer02_lua" time_out="10" active="TRUE" />
<script name="on_timer02_lua" run_mode="ASYNCHRONOUS" >
HYP_Object.SetRoll( "plane2", -0.2 );