LlSetLinkColor - Second Life Wiki

LlSetLinkColor

From Second Life Wiki

Jump to: navigation, search

Function: llSetLinkColor( integer linknumber, vector color, integer face );

140 Function ID
0.0 Delay
10.0 Energy

If a task exists in the link chain at linknumber, set face to color

• integer linknumber Link number (0: unlinked, 1: root prim, >1: other prims) or a LINK_* flag
• vector color color in RGB <R, G, B> (<0.0, 0.0, 0.0> = black, <1.0, 1.0, 1.0> = white)
• integer face face number or ALL_SIDES


If face is ALL_SIDES then the function works on all sides.

Flag Description
LINK_ROOT 1 sends to root prim in a linked set
LINK_SET -1 sends to all prims
LINK_ALL_OTHERS -2 sends to all other prims
Flag Description
LINK_ALL_CHILDREN -3 sends to all children
LINK_THIS -4 sends to the prim the script is in

Caveats

  • The function silently fails if its face value indicates a face that does not exist

Examples

Turn a link set green

 
default
{
    touch_start(integer detected)
    {
        llSetLinkColor(LINK_SET, <0.0, 1.0, 0.0>, ALL_SIDES);
    }
}
 

See Also

Events

•  changed CHANGED_COLOR

Functions

•  llGetLinkNumber Returns the link number of the prim the script is in.
•  llGetAlpha Gets the prim's alpha
•  llSetAlpha Sets the prim's alpha
•  llGetColor Gets the prim's color
•  llSetColor Sets the prim's color
•  llSetLinkAlpha
•  llSetLinkTexture
•  llSetLinkPrimitiveParams

Articles

•  Color in LSL