Difference between revisions of "LlStartAnimation"

From Second Life Wiki
Jump to navigation Jump to search
(Changed code example PRE tag to LSL tag)
m (fixe)
Line 1: Line 1:
{{Multi-lang}}
{{LSL_Function/permission|PERMISSION_TRIGGER_ANIMATION}}{{LSL_Function/inventory|anim|uuid=false|type}}{{LSL_Function
{{LSL_Function/permission|PERMISSION_TRIGGER_ANIMATION}}{{LSL_Function/inventory|anim|uuid=false|type}}{{LSL_Function
|func_id=129|func_sleep=0.0|func_energy=10.0
|func_id=129|func_sleep=0.0|func_energy=10.0

Revision as of 12:30, 29 January 2008

Summary

Function: llStartAnimation( string anim );
0.0 Forced Delay
10.0 Energy

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

• string anim an item in the inventory of the prim this script is in

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 then an error is shouted on DEBUG_CHANNEL.

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
•  llStopAnimation

Articles

•  Script permissions
•  Internal_Animations lists internal Animations always available

Deep Notes

Signature

function void llStartAnimation( string anim );