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/13/20 by Sabia Innovia with lots of help from Nep-Nep
- integer isEffectOn;
- checkIsEffectOn()
- {
- if (isEffectOn)
- {
- 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();
- }
- // script initialization here
- state_entry()
- {
- checkIsEffectOn();
- }
- touch_start(integer total_number)
- {
- //isEffectOn = !isEffectOn;
- checkIsEffectOn();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement