Skip to main content

Animation

Animation controls concurrent standalone clips authored in the active scene. These clips can target GameObjects, UI, rumble, and skeletal events. Audio and script events belong to Timeline tracks.

MethodReturnsDescription
Animation.Play(name[, loop])booleanStarts a clip using boolean loop shorthand.
Animation.Play(name[, options])booleanStarts with optional Loop and OnComplete.
Animation.Stop([name])noneStops one named clip or every active clip.
Animation.IsPlaying([name])booleanTests one named clip or any clip.
function OpenDoor(gameObjectId)
if not Animation.Play("Door Open", {
Loop = false,
OnComplete = function()
Log.Print("Door finished opening")
end
}) then
Log.Print("No animation slot is available")
end
end

The runtime has eight active standalone slots. A natural non-looping completion invokes OnComplete once; Animation.Stop and loop wrap do not. When concurrent clips write the same target property, higher-numbered active slots win for that frame. See Standalone Animations.