Unofficial LSL Reference

[[functions:llsetlinkcolor]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

Function: llSetLinkColor

llSetLinkColor(integer link, vector color, integer face)

Sets the color of a face or all faces in the current prim.

Parameters

An integer value defining the link number of the prim to be read.

The following special link specification constants can be used:-

ConstantValueDescription
LINK_THIS -4 refers to the prim the script is in
LINK_ROOT 1 refers to the root prim in a multi-prim linked set
LINK_SET -1 refers to all prims
LINK_ALL_OTHERS -2 refers to all prims other than the one the script is in
LINK_ALL_CHILDREN -3 refers to all children (everything but the root)

color

A LSL color vector (3 comma-separated RGB values in the range 0.0 to 1.0, between angle brackets)

face

An integer value defining the face of the prim to be affected. ALL_SIDES affects all faces.

Short examples

llSetLinkColor(LINK_SET, <0, 0.25, 0>, ALL_SIDES); // sets the color of the whole object to dark green
llSetLinkColor(2, <1, 0, 0>, 3); // will set face 3 of prim number 2 of the object to red

See also

  • llSetColor to set the color of a face on just the current prim.
  • llSetAlpha to change the opacity of a face in the current prim, or llSetLinkAlpha to change it for any prim within the object.
  • llSetTexture to change the texture of a face in the current prim, or llSetLinkTexture to change it for any prim within the object.
  • llSetTextureAnim animates a texture, which can be used to simulate rapidly changing colors with low lag.
  • The PrimitiveParams family of functions, with PRIM_COLOR, allows changing color and alpha at the same time.