Random Color

Date 2006/10/12 15:43:15 | Topic: Colors

This is a real simple, yet cool script. I've listed two versions below. The first will change colors in a single prim and the other is for multiple prims that are linked together.


Single Prim
default 
{
    
state_entry() 
    {
        
llSetTimerEvent(2.0); // every 2 seconds
    
}

    
timer() 
    {
        
llSetColor(<llFrand(1.0),llFrand(1.0),llFrand(1.0)>, ALL_SIDES);
    }
}


Multiple Prim
default 
{
    
state_entry() 
    {
        
llSetTimerEvent(2.0); // every 2 seconds
    
}

    
timer() 
    {
        
llSetLinkColor(LINK_SET, <llFrand(1.0),llFrand(1.0),llFrand(1.0)>, ALL_SIDES);
    }
}




This script comes from Alicia Stella Design - Best Tip Jars in Second Life
http://www.aliciastella.com

The URL for this script is:
http://www.aliciastella.com/modules/AMS/article.php?storyid=3