LlSetColor
From Second Life Wiki
| LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Tutorials |
Contents |
Newbie Notes
llSetColor changes the color of a prim, either on a specific side (face) or the entire prim.
Example:
llSetColor(<r, g, b>, ALL_SIDES);
r, g, b: values for red, green, blue ranging from <0.0, 0.0, 0.0> (black) to <1.0, 1.0, 1.0> (white)
To continue reading see: Newbie Notes
Examples
integer face = -1; vector color = <1.0, 1.0, 1.0>; default { touch_start(integer num) { if(~face)//quick & dirty check for -1 llSetColor(color, face); //restore the color face = (face + 1) % llGetNumberOfSides(); //increment and keep the face number in range color = llGetColor(face); //save the face's color llSetColor(<0.5, 0.0, 0.0>, face );//change the face's color } }
See Also
Events
| • | changed | – | CHANGED_COLOR |
Functions
| • | llGetAlpha | – | Gets the prim's alpha | |
| • | llSetAlpha | – | Sets the prim's alpha | |
| • | llGetColor | – | Gets the prim's color | |
| • | llSetLinkColor | – | Sets link's color | |
| • | llSetLinkAlpha | – | Sets link's alpha |
Articles
| • | Color in LSL |
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.

