Difference between revisions of "PRIM GLOW"
m |
(added a simple 1 line example to make syntax stand out on its own) |
||
Line 34: | Line 34: | ||
|r1_type=float|r1_name=intensity | |r1_type=float|r1_name=intensity | ||
}} | }} | ||
|examples=<lsl>//Each time the prim is touched, the intensity of the glow is increased (until it maxes out and cycles back to zero). | |examples= | ||
basic syntax | |||
<lsl> | |||
// adjust as desired .3 to a float number from 0 to 1.0 inclusive | |||
// adjust as desired ALL_SIDES to specific prim faces if desired | |||
llSetPrimitiveParams( [ PRIM_GLOW, ALL_SIDES, .3 ] ) ; | |||
</lsl> | |||
<lsl>//Each time the prim is touched, the intensity of the glow is increased (until it maxes out and cycles back to zero). | |||
integer PRIM_GLOW = 25; | integer PRIM_GLOW = 25; | ||
integer steps = 10; | integer steps = 10; |
Revision as of 08:36, 26 July 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Description
Constant: integer PRIM_GLOW = 25;The integer constant PRIM_GLOW has the value 25
PRIM_GLOW is used to get or set the glow status of the face. Use the integer number 25 if the compiler rejects the named constant.
llSetPrimitiveParams
[ PRIM_GLOW, integer face, float intensity ]• integer | face | – | face number or ALL_SIDES | |
• float | intensity | – | ranges from 0.0 to 1.0 |
When used with llSetPrimitiveParams & llSetLinkPrimitiveParams
llGetPrimitiveParams
llGetPrimitiveParams([ PRIM_GLOW, integer face ]);Caveats
Related Articles
Constants
• | CHANGED_TEXTURE |
Functions
• | llSetPrimitiveParams | |||
• | llSetLinkPrimitiveParams | |||
• | llGetPrimitiveParams |
Events
• | changed |
Examples
basic syntax <lsl> // adjust as desired .3 to a float number from 0 to 1.0 inclusive // adjust as desired ALL_SIDES to specific prim faces if desired
llSetPrimitiveParams( [ PRIM_GLOW, ALL_SIDES, .3 ] ) ; </lsl>
<lsl>//Each time the prim is touched, the intensity of the glow is increased (until it maxes out and cycles back to zero). integer PRIM_GLOW = 25; integer steps = 10; integer counter = 0;
default {
touch_start(integer total_number) { llSetPrimitiveParams( [ PRIM_GLOW, ALL_SIDES, counter / (steps - 1.0) ]); counter = (counter + 1) % steps; }
}</lsl><lsl>//Each time the prim is touched, the intensity of the glow is decreased (until it hits zero and cycles back to one). integer PRIM_GLOW = 25; integer steps = 10; integer counter = 0;
default {
touch_start(integer total_number) { llSetPrimitiveParams( [ PRIM_GLOW, ALL_SIDES, counter / (steps - 1.0) ]); counter = (counter + steps - 1) % steps; }
}</lsl>