Advertisement
itoibo

Dimmer Loop

Dec 24th, 2015
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. //dimmer while touching
  2. float bright = 0;
  3. float change = 0.2;
  4. default
  5. {
  6. touch(integer b)
  7. {
  8. bright += change;
  9. if(bright > 0.9)
  10. {
  11. change = -0.2;
  12. }
  13. else if(bright < 0.1)
  14. {
  15. change = 0.2;
  16. }
  17. {
  18. llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1,1,1>,bright,10.0,1.0]);
  19. llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, bright]);
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement