tetsujin

Sit script - stand up

Jun 1st, 2019
770
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     changed(integer change) {
  2.         if (change & CHANGED_LINK) {
  3.             key agent = llAvatarOnSitTarget();
  4.             if ( sitter == NULL_KEY && agent != NULL_KEY ) { // new sitter
  5.                 //cache new user key and request their permissions
  6.                 sitter = agent;
  7.                  llRequestPermissions(sitter,PERMISSION_TRIGGER_ANIMATION);
  8.                  // the rest is done in runtime - never assume you have perms, let runtime handle it.
  9.             }
  10.             else if ( sitter != NULL_KEY && agent == NULL_KEY) { //user is getting up                
  11.                 if (llGetAgentSize(sitter)) { // tests for avi still present, didn't logoff or TP away
  12.                     if( llGetPermissions() &  PERMISSION_TRIGGER_ANIMATION) { // test they didn't revoke perms
  13.                         llStopAnimation( animation );
  14.                     }
  15.                 }
  16.                 llResetScript(); //fully release perms.
  17.             }
  18.         }        
  19.     }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×