RandomPrimParams
Revision as of 14:41, 7 October 2012 by Kireji Haiku (talk | contribs) (reduced timer speed a bit and changed comments for better readability)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Simple script to show how to set random primitive parameters. <lsl> default {
state_entry() { // set timer to go off every other 5.0 seconds llSetTimerEvent(5.0); }
timer() { vector color = <llFrand(1.0), llFrand(1.0), llFrand(1.0)>;
// set random color on all sides of linkset with opaque as alpha value llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_COLOR, ALL_SIDES, color, (float)TRUE]); }
} </lsl>