Difference between revisions of "Osiris/Shared/ProcObjectTimer"

From Divinity Engine Wiki
Jump to: navigation, search
(Documented ProcObjectTimer, ProcObjectTimerCancel and ProcObjectTimerCancel)
 
m
 
Line 16: Line 16:
 
* [[Osiris/API/TimerUnpause|TimerUnpause]]
 
* [[Osiris/API/TimerUnpause|TimerUnpause]]
  
[[Category:Osiris Shared Mod Helpers|ProcObjectTimer]]
+
[[Category:Osiris Shared Mod Helpers|ObjectTimer]]

Latest revision as of 16:16, 9 January 2018

Full Definition(s)
  • PROC ProcObjectTimer((GUIDSTRING)_Object, (STRING)_TimerName, (INTEGER)_Time)
  • PROC ProcObjectTimerCancel((GUIDSTRING)_Object, (STRING)_TimerName)
  • PROC ProcObjectTimerFinished((GUIDSTRING)_Object, (STRING)_TimerName)
Description

These are equivalents of resp. TimerLaunch, TimerCancel and TimerFinished. Contrary to the Osiris APIs, these timers are associated with objects and hence multiple times with the same name can be started concurrently (as long as they associated with different objects).

As it is not possible to have user-defined events in Osiris, when such a timer finishes the ProcObjectTimerFinished procedure will be called with object and timer name originally specified to ProcObjectTimer. Create an overloaded definition of ProcObjectTimerFinished to catch this "event" and act upon it.

Notes
  • As these timers are built on TimerLaunch and friends, the same notes as for that API apply.
See Also