Difference between revisions of "User:PixelProphet Lane/Scripts"

From Second Life Wiki
Jump to navigation Jump to search
Line 562: Line 562:


Just a script to test if animation scripts are generally operational on a region.
Just a script to test if animation scripts are generally operational on a region.
Usage: Create a prim and drop this script inside, then either touch the prim, or sit on the prim.
Sitting on the prim will use auto-grant permission, so you will not see a permissions request dialog.


<lsl>
<lsl>

Revision as of 04:57, 17 May 2012


Real Object Inventory To Dialog


Show Agent Script Count and memory


Grid Status Feed


Animation Permissions Tester


Just a script to test if animation scripts are generally operational on a region. Usage: Create a prim and drop this script inside, then either touch the prim, or sit on the prim. Sitting on the prim will use auto-grant permission, so you will not see a permissions request dialog.

<lsl> default {

   on_rez(integer arg)
   {
       llResetScript();
   }
   
   state_entry()
   {
       llSitTarget(<0,0,1>,ZERO_ROTATION);    
   }
   touch_start(integer total_number)
   {
       llRequestPermissions(llDetectedKey(0),PERMISSION_TRIGGER_ANIMATION);
   }
   
   
   changed(integer change)
   {
       if (change & CHANGED_LINK)
       {
           if (llAvatarOnSitTarget())
               llRequestPermissions(llAvatarOnSitTarget(),PERMISSION_TRIGGER_ANIMATION);
       }
   }
   
   run_time_permissions(integer perm)
   {
       if (perm & PERMISSION_TRIGGER_ANIMATION)
       {
           llWhisper(0,"PERMISSION_TRIGGER_ANIMATION granted");
           llStopAnimation("stand");
           llStopAnimation("sit");
           llStartAnimation("dance1");
       }
   }

} </lsl>