Skip to content
lsl.devlsl.devLSL Dev

llStopAnimation

function
Function syntax
llStopAnimation(
  1. string anim// Name of the animation in the prim's inventory, the UUID of the animation, or the built-in animation name.
);
Energy
10

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.

How to use
llStopAnimation("");
  • 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.
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"))

From the issue templates included by the wiki article:

  • SVC-3860: type=bug|llStopAnimation(“prejump”) freezes avatar
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.