Difference between revisions of "StopAnimation"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 23: Line 23:
 
stopAnimation(anim)
 
stopAnimation(anim)
 
</syntaxhighlight>
 
</syntaxhighlight>
[[Category:Player Commands]]
 

Revision as of 22:28, 30 September 2014

stopAnimation

Available since: v3.0
Stops a running animation. If the animation is preloaded but not active or not active at all then nothing happens.

Lua Syntax:

stopAnimation(animation)

Arguments

animation

"object path"|"object id"|object - Visionaire object which specifies an animation.

Flags

Return Values

None.

Examples

Example 1:

stopAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]")

Example 2:

local anim = getObject("Animations[animation_name]")
stopAnimation(anim)