TEXT   232

LSL Black/White Alternating Color Script

Guest on 15th June 2022 02:39:39 AM

  1. //Create a backdrop or photobooth and set the texture to Blank and color to Full Bright
  2. //If there are multiple prims, link them together first
  3. //Left-click will start and stop the automatic color changes
  4.  
  5. integer i = 0;
  6. integer on = 0;
  7. default {
  8.     touch_start(integer total_number) {
  9.         if (llDetectedKey(0) == llGetOwner()) {
  10.             if(on){
  11.     llSetTimerEvent(0);
  12.     on = 0;
  13.     } else {
  14.     llSetTimerEvent(3);
  15.     on = 1;
  16.     }
  17.         }
  18.     }
  19.   timer(){
  20.     if (i == 0) {
  21.                llSetLinkColor(LINK_SET, <0.0, 0.0, 0.0>, ALL_SIDES);
  22.                i = 1;
  23.             }
  24.             else {
  25.                llSetLinkColor(LINK_SET, <1.0, 1.0, 1.0>, ALL_SIDES);
  26.                i = 0;
  27.             }
  28.   }
  29. }

Raw Paste


Login or Register to edit or fork this paste. It's free.