Osiris/API/CharacterFlushQueue

From Divinity Engine Wiki
Revision as of 10:51, 13 September 2017 by Tinkerer (talk | contribs) (Replaced some keywords by links, corrected misinformation about this call also flushing PlayAnimation calls)
Jump to: navigation, search
Full Definition(s)
  • call CharacterFlushQueue((CHARACTERGUID)_Character)
Description

If you start an Osiris action for a character while another is still busy, or multiple actions at the same time, then these actions are all queued. For example, you can queue multiple CharacterMoveTo events to prevent a hick-up between catching the event from arriving and dispatching the next move.

This call will complete the currently executing action and all queued actions for _Character instantaneously while preserving their side-effects. This means that move events are turned into teleports, while animations are skipped (but their completion events will still be triggered, in order).

Notes
  • This will only flush actions queued from Osiris. It has no effect on actions started from behaviour scripts.
  • If you wish to discard the queued actions instead of make their effects happen immediately, use CharacterPurgeQueue instead.
  • A notable exception of APIs not affected by this API PlayAnimation. See that page for information on how to abort an ongoing animation.
See Also