Difference between revisions of "LlStopAnimation"

From Second Life Wiki
Jump to: navigation, search
m (fixe)
m (lsl code tagging)
Line 10: Line 10:
 
|constants
 
|constants
 
|examples=
 
|examples=
<Pre>
+
<lsl>
 
default
 
default
 
{
 
{
Line 32: Line 32:
 
     }
 
     }
 
}
 
}
</Pre>
+
</lsl>
 
|helpers
 
|helpers
 
|also_functions={{LSL DefineRow||[[llGetAnimationList]]|Gets a list of playing animations}}
 
|also_functions={{LSL DefineRow||[[llGetAnimationList]]|Gets a list of playing animations}}

Revision as of 13:10, 31 March 2008

Summary

Function: llStopAnimation( string anim );

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

• string anim an animation in the inventory of the prim this script is in or a UUID of an animation

To run this function the script must request the PERMISSION_TRIGGER_ANIMATION permission with llRequestPermissions.

Caveats

Permissions
  • 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.
All Issues ~ Search JIRA for related Bugs

Examples

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

}

</lsl>

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

Deep Notes

Search JIRA for related Issues

Signature

function void llStopAnimation( string anim );