Difference between revisions of "StopAnimation"
From The Official Visionaire Studio: Adventure Game Engine Wiki
| Line 1: | Line 1: | ||
| − | + | ==stopAnimation== | |
| − | |||
| − | |||
| − | |||
| − | |||
| + | <div class="command-min-version-info">Available since: <span class="command-min-version">v3.0</span></div> | ||
| − | + | <div class="command-doc">Stops a running animation. If the animation is preloaded but not active or not active at all then nothing happens.</div> | |
| − | + | Lua Syntax: | |
| − | Syntax: | + | <pre class="command-syntax">stopAnimation(animation)</pre> |
| − | < | + | ===Arguments=== |
| − | stopAnimation(animation) | + | ====animation==== |
| − | </ | + | :'''"object path"|"object id"|object''' - Visionaire object which specifies an animation. |
| − | + | ===Flags=== | |
| − | + | ===Return Values=== | |
| − | Example 1: | + | None. |
| + | ===Examples=== | ||
| + | Example 1: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
stopAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]") | stopAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]") | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | Example 2: | |
| − | Example 2: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| − | |||
local anim = getObject("Animations[animation_name]") | local anim = getObject("Animations[animation_name]") | ||
stopAnimation(anim) | stopAnimation(anim) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 17:12, 22 November 2013
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)