Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This script is adapted from the Second Lif Wiki at:
- // http://wiki.secondlife.com/wiki/Category:LSL_Light
- // Instead of turning on light, it rotates the prim and provides provide floating text
- // Modified 12/8/20 by Sabia Innovia, Innovia Designs
- integer isEffectOn;
- integer checkIsEffectOn();
- {
- if
- {
- llSetText("Click\n\nMe!",<0,255,255>,1.0);
- // Turn off rotation by setting gain to zero if prim not clicked
- llTargetOmega(<0,0,1>,PI,0.0);
- }
- else
- {
- llSetText("Happy\n\nHannukkah!",<0,255,255>,1.0);
- // turn on rotation - spin the dreidel!
- llTargetOmega(<0,0,1>,PI,1.0);
- }
- }
- default
- {
- // reset script when the object is rezzed
- on_rez(integer start_param)
- {
- llResetScript();
- }
- changed(integer change)
- {
- // reset script when the owner or the inventory changed
- if (change & (CHANGED_OWNER | CHANGED_INVENTORY)) llResetScript();
- }
- // script initialization here
- state_entry()
- {
- touch_start(integer total_number)
- //toggle isEffectOn between TRUE and FALSE
- isEffectOn = !isEffectOn;
- }
- checkIsEffectOn()
- {
- if (!isEffectOn)()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement