SHARE
TWEET

Untitled

a guest Jul 19th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. default
  2. {
  3.     touch_start(integer detected)
  4.     {
  5.         llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION); //Every time you request permissions, the scripts sends a request window to the person you requested for (llDetectedKey(0), the toucher in this case) and as soon as the permissions are granted, runs the run_time_permissions event,
  6.     }
  7.  
  8.     run_time_permissions(integer perm) //This event runs only when the user has accepted the permission request. In some cases this happens automatically, like with worn or sat upon objects.
  9.     {
  10.         if (perm & PERMISSION_TRIGGER_ANIMATION)
  11.         {
  12.             if(!isDialogActive) //We use this variable to make sure we only launch the dialog window once, since using the dialog to start new animations will silently launch new pernission events.
  13.             {
  14.                 llDialog(<stuff>);
  15.                 isDialogActive = TRUE;
  16.                 llOwnerSay("Menu will time out in 60 seconds");
  17.             }
  18.             llStartAnimation("sit"); //llStartAnimation() affects the last person we granted permissions to, so it is important to keep it inside the run_time_permissions event. If we used it outside, it would still work but might get confused if other people also request permissions.
  19.                 llSetTimerEvent(60.0);
  20.         }
  21.     }
  22.  
  23.     timer()
  24.     {
  25.         llSetTimerEvent(0.0);
  26.         isDialogActive = FALSE;
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top