Difference between revisions of "StartAnimation"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Redirected page to Global Command: startAnimation)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
−
==startAnimation==
+
#REDIRECT [[Global Command: startAnimation]]
−
 
 
−
<div class="command-min-version-info">Available since: <span class="command-min-version">v3.0</span></div>
 
−
 
 
−
<div class="command-doc">Starts an animation. If the animation is already running the existing animation is returned.</div>
 
−
 
 
−
Lua Syntax:
 
−
<pre class="command-syntax">startAnimation(animation [, reverse])</pre>
 
−
===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:
 
−
<syntaxhighlight>
 
−
startAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]"))
 
−
</syntaxhighlight>
 
−
Example 2:
 
−
<syntaxhighlight>
 
−
local anim = getObject("Animations[animation_name]")
 
−
startAnimation(anim)
 
−
</syntaxhighlight>
 

Latest revision as of 13:34, 19 May 2023