daily pastebin goal
40%
SHARE
TWEET

CHANGED_SCALE detect

RiverFromSL Feb 3rd, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer gIgnoreNext = FALSE;
  2.  
  3. default
  4. {
  5.     state_entry()
  6.     {
  7.         gIgnoreNext = TRUE;
  8.         llSetScale(<0.5, 0.5, 0.5>);
  9.     }
  10.  
  11.     touch_start(integer total_number)
  12.     {
  13.         vector size = llGetScale();
  14.         size = size * 1.1;
  15.         gIgnoreNext = TRUE;
  16.         llSetScale(size);
  17.     }
  18.  
  19.     changed(integer chg)
  20.     {
  21.         if(chg & CHANGED_SCALE) {
  22.             if(gIgnoreNext) {
  23.                 llOwnerSay("Changed by script");
  24.                 gIgnoreNext = FALSE;
  25.                 }
  26.             else {
  27.                 llOwnerSay("Changed by user");
  28.                 }
  29.             }
  30.     }
  31.  
  32. }
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