MUDL:timer add event

From WikiName
Revision as of 20:48, 6 November 2018 by Teker (talk | contribs)
Jump to: navigation, search


Summary

Function Name timer_add_event
Settable No
Returns Boolean


Parameter Options
Queue Name (string), Time In Seconds (integer), Optional Data (string)
Queue Name (string), Time In Seconds (integer), Character, Optional Data (string)
Queue Name (string), Time In Seconds (integer), Item, Optional Data (string)
Queue Name (string), Time In Seconds (integer), Room, Optional Data (string)
Queue Name (string), Time In Seconds (integer), Area, Optional Data (string)
Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Optional Data (string)
Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Character, Optional Data (string)
Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Item, Optional Data (string)
Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Room, Optional Data (string)
Config Parent (MUDL2 object), Proc Index (integer), Queue Name (string), Time In Seconds (integer), Area, Optional Data (string)


This function manages a set of KVP keys and values to provide a method to queue events to occur in the future. If a form of the function is used that does not specify a Queue Parent or Procedure Index, the parent of the current MUDL script is used along with the current procedure index to store these values. Events that have been queued can be processed by the Queue Parent by periodically calling the timer_process_queue MUDL function.


Key Value Pairs

Arguments
<Queue Name>_INDEX An integer value that tracks the key name for the next queued element.
<Queue Name>_ELEMENT_<Number> A specially formatted value containing a single element in the queue. Currently the value contains 5 entries separated by colons.

The text to be heard by the second actor.


Example

timer_add_event(%room, 0, 'MY_QUEUE', 300, %a, 'My Data')