Difference between revisions of "Osiris/API/CharacterFlushQueue"

From Divinity Engine Wiki
Jump to: navigation, search
(Osiris Core APIs)
 
m
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
* call '''CharacterFlushQueue'''(''(CHARACTERGUID)'''''_Character''')
 
* call '''CharacterFlushQueue'''(''(CHARACTERGUID)'''''_Character''')
 
===== Description =====
 
===== 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. Another example of an action that can take quite a while to complete is '''PlayAnimation'''.
+
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 [[Osiris/API/CharacterMoveTo|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).
 
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 =====
 
===== Notes =====
 
* This will only flush actions queued from Osiris. It has no effect on actions started from behaviour scripts.
 
* 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
+
* If you wish to discard the queued actions instead of make their effects happen immediately, use [[Osiris/API/CharacterPurgeQueue|CharacterPurgeQueue]] instead.
 +
* A notable exception of APIs not affected by this API [[Osiris/API/PlayAnimation|PlayAnimation]]. An ongoing animation can be aborted by playing a new animation on the same object. If you specify a non-existent animation (such as the empty string), it will stop the ongoing animation without starting a new one (there is no clean way to achieve the same result).
 
===== See Also =====
 
===== See Also =====
* [[Osiris/API/CharacterPurgeQueue]]
+
* [[Osiris/API/CharacterPurgeQueue|CharacterPurgeQueue]]
 
    
 
    
[[Category:Osiris Calls]]
+
[[Category:Osiris Calls|CharacterFlushQueue]]

Latest revision as of 11:17, 20 December 2017

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. An ongoing animation can be aborted by playing a new animation on the same object. If you specify a non-existent animation (such as the empty string), it will stop the ongoing animation without starting a new one (there is no clean way to achieve the same result).
See Also