function
Function syntax
llStopAnimation(string anim// Name of the animation in the prim's inventory, the UUID of the animation, or the built-in animation name.
);- Energy
- 10
- Permission
PERMISSION_TRIGGER_ANIMATION
Stops the specified animation anim (inventory, built-in, or UUID) on the avatar who granted the script the PERMISSION_TRIGGER_ANIMATION permission (automatically granted for attached or sat-on objects).
Stop animation anim for agent that granted PERMISSION_TRIGGER_ANIMATION if the permission has not been revoked.
llStopAnimation("");Caveats
Section titled “Caveats”- If the animation to be stopped is the only playing animation (as found via
llGetAnimationList), it will continue to play to its end (if looped it will continue indefinitely) - if you must stop a looped animation, playing a single frame non-looped one immediately after stopping it, at low priority, will clear the list.
Examples
Section titled “Examples”Example 1
16 collapsed lines
default{ touch_start(integer detected) { llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llStartAnimation("sit"); llOwnerSay("animation will end in 5 seconds"); llSetTimerEvent(5.0); } } timer() { llSetTimerEvent(0.0); llStopAnimation("sit"); }}llStopAnimation(llGetAnimationOverride("Sitting"))Known issues
Section titled “Known issues”From the issue templates included by the wiki article:
- SVC-3860: type=bug|llStopAnimation(“prejump”) freezes avatar
See also
Section titled “See also”Functions
Section titled “Functions”llGetAnimationList— Gets a list of playing animationsllStartAnimation— Starts playing an animation
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.