Setting colors

Colorator, Owner Control.   Responds to touch by owner only.  Changes to a new pastel color.  
float randFMTO(float FM, float TO)
{ return llFrand(TO- FM) + FM; }
 
User defined function  Result is random number ranging  from FM to TO.
key toucher; Global variables
default { See: Owner colored wall panel

touch_start(integer total_num)

Event: Touch  LSL is always watching for a touch on an object.  So this event needs no set up

{ toucher = llDetectedKey(0);

identify toucher

if(toucher == llGetOwner() )

 

{float red = randFMTO (.5, 1 );
float green = randFMTO (.5, 1 );
float blue =randFMTO (.5, 1 );
llSetColor(<(float)red,(float)green,(float)blue >, ALL_SIDES);}

Setting colors

Sides

else

 

llSay(0,"I don't know you");

Braces not needed for a single line after else or if.
  }
}
Close Touch block
Close default
The Thinkerer 09/13/2008
Copyright (c) D. F. Dansereau & S. H. Evans

Site Map

Where start?

LODScr
Famous fables