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.
| Method | Returns | Description |
|---|---|---|
Animation.Play(name[, loop]) | boolean | Starts a clip using boolean loop shorthand. |
Animation.Play(name[, options]) | boolean | Starts with optional Loop and OnComplete. |
Animation.Stop([name]) | none | Stops one named clip or every active clip. |
Animation.IsPlaying([name]) | boolean | Tests 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.