## Rainbow Color Changer

```// Place in contents of a prim. Touch to start or stop

integer ON = FALSE;
integer loop;
float x;
default
{
touch_start(integer total_number)
{
llSetTimerEvent(0.5*(ON = !ON));
loop = 1;
x = 0;
}

timer()
{
if(loop == 1)
{
llSetColor(<1,0.2*x,0>,ALL_SIDES);
x = x+0.25;
if (x > 5)
{
loop = 2;
x = 5;
}
}
else if (loop ==2)
{
llSetColor(<0.2*x,1,0>,ALL_SIDES);
x = x-0.25;
if(x < 0)
{
loop = 3;
x = 1;
}
}
else if (loop == 3)
{
llSetColor(<0,1.0-(0.2*x),0.2*x>,ALL_SIDES);
x = x+0.25;
if(x > 5)
{
loop = 4;
x = 5;
}
}
else if (loop == 4)
{
llSetColor(<1.0-(0.2*x),0,1>,ALL_SIDES);
x = x-0.25;
if(x < 0)
{
loop = 5;
x = 1;
}
}
else if (loop == 5)
{
llSetColor(<1,0,1.0-(0.2*x)>,ALL_SIDES);
x = x+0.25;
if (x > 5)
{
loop = 1;
x = 0;
}
}
}
}```

## Flash Scratch to SL - Your Scripting Tool Need 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.

### Latest Posts

• No posts to display.