StartAnimation
Command History
Allows you to play any animation; if the animation is already playing then the existing animation is returned!
Syntax:
startAnimation(animation, reverse=true/false)
Example 1: basic start animation method (default direction)
--[[
!important: you must take care when using this method that there is only instance of the animation you are calling.
--]]
-- shortened get animation method; !important: see comment above!
startAnimation("Animations[animation_name]")
-- full get animation method; !recommended
startAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]")
Example 2: basic start animation method (reverse direction)
-- shortened get animation example; !important: see comment in "example 1"!
startAnimation("Animations[animation_name", true)
Example 3: start animation via a variable
-- you can of course use variables with animations stored in them instead!
local anim = getObject("Animations[animation_name]")
startAnimation(anim) -- default direction!
startAnimation(anim, true) -- reversed direction!
Arguments
animation: path
The path to the animation to be started! ("path"."object"."animation")
Flags
reverse: boolean (true/false)
True will play the animation in reverse, whereas false will play the animation forwards! (false is default)
Return
visionaireObject
The visionaire object representing the active animation!
日本語 – 正體中文 – 한국어 – Dansk – Deutsch – English – Español – Français – Italiano – Nederlands – Polski – Português – Svenska – Русский |
Relevant Pages: stopAnimation |