Difference between revisions of "Osiris/API/PlayAnimation"

From Divinity Engine Wiki
Jump to: navigation, search
m
m
 
(5 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
Plays the animation with [[Visual_resource_panel|simple name]] '''_Animation''' on '''_SourceObject'''. Once the animation has finished playing, the event '''_Event''' will be thrown.
 
Plays the animation with [[Visual_resource_panel|simple name]] '''_Animation''' on '''_SourceObject'''. Once the animation has finished playing, the event '''_Event''' will be thrown.
 
===== Notes =====
 
===== Notes =====
* We have a [[Standard_Character_Animations|list]] of simple names of character animations and the playable races they are available to.
+
* We have a [[Standard_Character_Animations|list]] of simple names of character animations and the playable races for which they are available.
 
* After a character animation has played, the character will return to its default idle position/state. This cannot be prevented from Osiris. If you use the [[Character_and_Item_Script_Triggers,_Calls,_and_Queries|behaviour script]] '''CharacterPlayAnimation''' call, you can avoid this by specifying '''0''' as the '''exitOnFinish''' parameter.
 
* After a character animation has played, the character will return to its default idle position/state. This cannot be prevented from Osiris. If you use the [[Character_and_Item_Script_Triggers,_Calls,_and_Queries|behaviour script]] '''CharacterPlayAnimation''' call, you can avoid this by specifying '''0''' as the '''exitOnFinish''' parameter.
* This call is only supported for non-looping animations. Use [[Osiris/API/SetAnimationOverride|SetAnimationOverride]] to play looping animations.
+
* This call works for both looping and non-looping animations, but looping animations will play only once. Animations set through this call override/interrupt looping animations set via [[Osiris/API/CharacterSetAnimationOverride|CharacterSetAnimationOverride]].
 
* While not officially supported, you can abort an ongoing animation by playing an invalid animation on an object (e.g., specify "" as '''_Animation'''). In fact, this is the only way to stop an ongoing animation.
 
* While not officially supported, you can abort an ongoing animation by playing an invalid animation on an object (e.g., specify "" as '''_Animation'''). In fact, this is the only way to stop an ongoing animation.
 +
 
===== See Also =====
 
===== See Also =====
 
* [[Osiris/API/SetAnimationOverride|SetAnimationOverride]]
 
* [[Osiris/API/SetAnimationOverride|SetAnimationOverride]]
 
* [[Osiris/API/StoryEvent|StoryEvent]]
 
* [[Osiris/API/StoryEvent|StoryEvent]]
  
[[Category:Osiris Calls]]
+
[[Category:Osiris Calls|PlayAnimation]]

Latest revision as of 23:37, 9 April 2019

Full Definition(s)
  • call PlayAnimation((GUIDSTRING)_SourceObject, (STRING)_Animation, (STRING)_Event)
Description

Plays the animation with simple name _Animation on _SourceObject. Once the animation has finished playing, the event _Event will be thrown.

Notes
  • We have a list of simple names of character animations and the playable races for which they are available.
  • After a character animation has played, the character will return to its default idle position/state. This cannot be prevented from Osiris. If you use the behaviour script CharacterPlayAnimation call, you can avoid this by specifying 0 as the exitOnFinish parameter.
  • This call works for both looping and non-looping animations, but looping animations will play only once. Animations set through this call override/interrupt looping animations set via CharacterSetAnimationOverride.
  • While not officially supported, you can abort an ongoing animation by playing an invalid animation on an object (e.g., specify "" as _Animation). In fact, this is the only way to stop an ongoing animation.
See Also