Osiris/Shared/ProcObjectTimer

From Divinity Engine Wiki
Jump to: navigation, search
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