Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. default
  2. {
  3. state_entry()
  4. {
  5. llListen(0,"","","colors");
  6. llListen(0,"","","stop");
  7.  
  8. }
  9. listen (integer channel, string name, key id, string message)
  10. {
  11. if (message == "colors")
  12. {
  13. float random = llFrand(1.9)+.5;
  14. llSetTimerEvent(random);
  15. }
  16. if (message == "stop")
  17. {
  18. llSetTimerEvent(0.0);
  19. // llSetColor(c,-1);
  20. }
  21.  
  22. }
  23. timer()
  24. {
  25. integer x =llFloor( llFrand(3));
  26. vector color;
  27. if (x==0)
  28. {
  29. color=<1,0,0>;
  30. }
  31. if (x==1)
  32. {
  33. color=<0,0,1>;
  34. }
  35. if (x==2)
  36. {
  37. color=<1,1,1>;
  38. }
  39. llSetColor(color,-1);
  40.  
  41. }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement