EventTimer

A supplementary entity that enables the dispatching of an event to a chosen object with a specified time interval. 
 

 
Useful scenarios include: 
  • Determining the overall duration of a gaming session. 
  • Interacting with artificial intelligence by activating alternate behavior upon reaching a specified time. 
  • Creating logical sequences. 
 

 
Menu --> Create --> Other Objects --> EventTimer
 

 

Primary Parameters: 

Duration 
Time interval (in seconds) before the event is dispatched. 0 means that EventTimer sends the event immediately. 
NumTimes 
Number of playback cycles 
Receivers 
List of object(s) to which the event will be addressed 
Event 
Name of the event that will be directed to the previously mentioned object 
Sleep When Die 
Allows the timer not to be deleted upon completion of the cycle(s) 
 

Supplementary Parameters: 

Deadline 1 
This option enables the EventTimer to dispatch two events at distinct and sequential times, rather than just one.  
 
The time interval (in seconds) that is activated after completion of the set period (Duration), and after which a new event (Event1) can potentially be initiated.  
Receivers 1 
The object that will be the recipient of the message (Event), after the lapse of the time specified in Deadline 1. 
Event 1 
The name of the event that will be directed to the previously specified object upon the arrival of the first deadline (Deadline 1). 
 

Debugging: 

Run In Editor 
An indicator facilitating the operation of the "EventTimer" in the editor during game simulation. 
 
Verbose 
Provides the capability to log the completion event of the "EventTimer" in the LOG journal. 
 
OnTimeEnd 
The message that the timer dispatches to itself upon reaching the set duration.  
 
Within the GameMachine (FSM), this message is processed as a TIME_END event. 
 
This message can be accessed in the s2script using the Message() entry function.  
 
The "Models" and "Renders" categories are not part of the "EventTimer" settings, as they are general parameters for all types of objects. 
These parameters do not directly influence the optimization process.