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;
- default
- {
- on_rez(integer start_param)
- {
- // Restarts the script every time the object is rezzed
- llResetScript();
- }
- touch_start(integer total_number)
- {
- // toggle isEffectOn between TRUE and FALSE
- isEffectOn = !isEffectOn;
- 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);
- }
- }
- }
Add Comment
Please, Sign In to add comment