Global Command: stopAnimation

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Redirected from StopAnimation)

Stop a running animation.

Related functions startAnimation


Syntax

stopAnimation(animation)


Parameters

Parameter Type Description
animation TVisObj Visionaire object representing an animation.


Return values

none


Examples

Example 1: Stop an animation.

local myAnimation = Animations["animation_name"]
stopAnimation(myAnimation)


Example 2: Start an animation and stop it after a certain time, depending on a Visionaire value called "duration" holding the amount of seconds.

local myDelay = Values["duration"].Int
myAnimation = Animations["animation_name"]

startAnimation(myAnimation)
setDelay(myDelay * 1000, "stopAnimation(myAnimation)")