Advertisement
StanHebben

Disco light

Jan 23rd, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. int case1 = 1;
  2. int col_1 = 255;
  3. int col_2 = 0;
  4. int col_3 = 0;
  5.  
  6. void Main(string Argument)
  7. {
  8.  
  9. if (case1 == 6)
  10. {
  11. col_3 -= 2;
  12. if (col_3 <= 0)
  13. {
  14. col_3 = 0;
  15. case1 = 1;
  16. }
  17. }
  18. if (case1 == 5)
  19. {
  20. col_1 += 2;
  21. if (col_1 >= 255)
  22. {
  23. col_1 = 255;
  24. case1 = 6;
  25. }
  26. }
  27. if (case1 == 4)
  28. {
  29. col_2 -= 2;
  30. if (col_2 <= 0)
  31. {
  32. col_2 = 0;
  33. case1 = 5;
  34. }
  35. }
  36. if (case1 == 3)
  37. {
  38. col_3 += 2;
  39. if (col_3 >= 255)
  40. {
  41. col_3 = 255;
  42. case1 = 4;
  43. }
  44. }
  45. if (case1 == 2)
  46. {
  47. col_1 -= 2;
  48. if (col_1 <= 0)
  49. {
  50. col_1 = 0;
  51. case1 = 3;
  52. }
  53. }
  54. if (case1 == 1)
  55. {
  56. col_2 += 2;
  57. if (col_2 >= 255)
  58. {
  59. col_2 = 255;
  60. case1 = 2;
  61. }
  62. }
  63.  
  64. var light = GridTerminalSystem.GetBlockWithName("Interior Light");
  65. light.SetValue("Color", new VRageMath.Color(col_1, col_2, col_3));
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement