Difference between revisions of "StartAnimation"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 19: | Line 19: | ||
Example 1: | Example 1: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | startAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]" | + | startAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]") |
</syntaxhighlight> | </syntaxhighlight> | ||
Example 2: | Example 2: |
Revision as of 17:41, 10 March 2017
Contents
startAnimation
Available since: v3.0
Starts an animation. If the animation is already running the existing animation is returned.
Lua Syntax:
startAnimation(animation [, reverse])
Arguments
animation
- "object path"|"object id"|object - Visionaire object which specifies an animation.
reverse
- true|false - If true the animation is played in reverse order. Default value is false.
Flags
Return Values
- visionaireObject
- The visionaire object representing the active animation.
Examples
Example 1:
startAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]")
Example 2:
local anim = getObject("Animations[animation_name]")
startAnimation(anim)