Difference between revisions of "RandomPrimParams"
Jump to navigation
Jump to search
(cleanup) |
|||
Line 1: | Line 1: | ||
<lsl> | {{LSL Header}}{{LSLC|Examples}} | ||
Simple script to show how to set random {{LSLGC|PrimParams|primitive parameters}}. | |||
default { | <lsl>default { | ||
state_entry() { | |||
llSetTimerEvent(0.2); // How fast repeat event | |||
} | |||
timer() { | |||
vector color = <llFrand(1.0), llFrand(1.0), llFrand(1.0)>;//<r,g,b> | |||
llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_COLOR, ALL_SIDES, color, 1.0]); // You can use any PrimParams here like for example PRIM_GLOW | |||
} | |||
}</lsl> | |||
llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_COLOR,ALL_SIDES, | |||
} | |||
</lsl> |
Revision as of 20:59, 29 April 2012
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() { llSetTimerEvent(0.2); // How fast repeat event } timer() { vector color = <llFrand(1.0), llFrand(1.0), llFrand(1.0)>;//<r,g,b> llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_COLOR, ALL_SIDES, color, 1.0]); // You can use any PrimParams here like for example PRIM_GLOW }
}</lsl>