Advertisement
Sabia_Innovia

Dreidel Script 7

Dec 13th, 2020
791
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This script is adapted from the Second Lif Wiki at:
  2. // http://wiki.secondlife.com/wiki/Category:LSL_Light
  3. // Instead of turning on light, it rotates the prim and provides provide floating text
  4. // Modified 12/13/20 by Sabia Innovia with lots of help from Nep-Nep
  5.  
  6. integer isEffectOn;
  7.  
  8. checkIsEffectOn()
  9.     {
  10.             if (isEffectOn)
  11.            
  12.             {
  13.             llSetText("Click\n\nMe!",<0,255,255>,1.0);
  14.               // Turn off rotation by setting gain to zero if prim not clicked
  15.               llTargetOmega(<0,0,1>,PI,0.0);  
  16.             }
  17.             else
  18.             {
  19.                 llSetText("Happy\n\nHannukkah!",<0,255,255>,1.0);
  20.                 // turn on rotation - spin the dreidel!
  21.                 llTargetOmega(<0,0,1>,PI,1.0);
  22.                
  23.             }
  24.  
  25.     }
  26.  
  27. default
  28. {
  29.     // reset script when the object is rezzed
  30.     on_rez(integer start_param)
  31.     {
  32.         llResetScript();
  33.     }
  34.  
  35.     // script initialization here
  36.     state_entry()
  37.     {
  38.  
  39.     checkIsEffectOn();  
  40.        
  41.     }
  42.    
  43.         touch_start(integer total_number)
  44.         {
  45.             //isEffectOn = !isEffectOn;
  46.             checkIsEffectOn();
  47.         }
  48.      
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement