Color change Script with Timer

vector FIRST_COLOR = <1.0,0.0,0.0>;
vector SECOND_COLOR = <0.0,1.0,0.0>;

float TIMER_INTERVAL = 1.0;

default {
   state_entry() {
      //
      //   all states will hear this timer until one of them
      //   stops it using llSetTimerEvent( 0.0 )
      //
      llSetTimerEvent( TIMER_INTERVAL );
      //
      // start the color cycle
      //
      state first_color;
   }
}

state first_color {
     state_entry() {
        llSetColor( FIRST_COLOR, ALL_SIDES );
     }

     timer() {
        state second_color;
     }
}

state second_color {
     state_entry() {
        llSetColor( SECOND_COLOR, ALL_SIDES );
     }

     timer() { 
        state first_color;
     }
}

 

Flash Scratch to SL - Your Scripting Tool

Script ImageNeed to write a LSL script and don't know how to script?  I know I hate trying to get my head around LSLS when I an in a time crunch. So why not give Flash Scratch a try! Its a great tool for learning and scoding your own scripts for Second Life without having to pay someone to do it and without a crash course in LSL

A Huge thanks to John Bennet of ATLAS Institute at University of Colorado and Eric Rosenbaum at MIT for writing Scratch for SL to begin with.

Read more: Flash Scratch to SL - Your Scripting Tool