LlStopAnimation

From Second Life Wiki

Jump to: navigation, search

Contents

Description

Function: llStopAnimation( string anim );
130 Function ID
0.0 Delay
10.0 Energy

Stop animation anim for agent that granted PERMISSION_TRIGGER_ANIMATION if the permission has not been revoked.

• string anim an animation in the prim's inventory or UUID


Requires the PERMISSION_TRIGGER_ANIMATION permission to run.

Caveats

  • Do not depend upon the auto-grant status of permissions. Always use the run_time_permissions event.
  • If the script lacks the permission PERMISSION_TRIGGER_ANIMATION, the script will shout an error on DEBUG_CHANNEL and the operation fails (but the script continues to run).
  • Once the PERMISSION_TRIGGER_ANIMATION permission is granted there is no way to revoke it. The script will only loose the permission if it is reset or the object derezzed (deleted, detached, or taken).
  • If anim is missing from the prim's inventory and it is not a UUID or it is not an animation then an error is shouted on DEBUG_CHANNEL.
  • If anim is a UUID then there are no new asset permissions consequences for the object.
    • The resulting object develops no new usage restrictions that might have occurred if the asset had been placed in the prims inventory.

Examples

 
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");
    }
}
 

See Also

Events

•  run_time_permissions Permission receiving event

Functions

•  llGetPermissions Get the permissions granted
•  llGetPermissionsKey Get the agent who granted permissions
•  llRequestPermissions Request permissions
•  llGetAnimationList Gets a list of playing animations
•  llStartAnimation Starts playing an animation

Articles

•  Script permissions
Personal tools