Unofficial LSL Reference

[[functions:llsetcolor]]


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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

functions:llsetcolor [2014-01-04 12:11 SLT]
omei created
functions:llsetcolor [2015-02-04 17:59 SLT] (current)
sei See Also: +llSetTexture
Line 1: Line 1:
 +$nav
 ===== Function: llSetColor ===== ===== Function: llSetColor =====
  
Line 4: Line 5:
 llSetColor(vector color, integer face) llSetColor(vector color, integer face)
 </​code>​ </​code>​
 +Sets the $lart[color] of a face or all faces in the current prim.
  
 ===== Parameters ===== ===== Parameters =====
  
 === color === === color ===
-is an SL color vector (3 RGB values in the range 0.0 to 1.0)+$colorparam
  
 === face === === face ===
-is an integer defining which face of the prim will have its color set. +$faceparam
-The special value ALL_SIDES selects every face of the prim. +
- +
-===== Notes ===== +
- +
-  * The function fails silently if '​face'​ indicates a non-existent face.+
  
 ===== Short examples ===== ===== Short examples =====
Line 31: Line 28:
     state_entry()     state_entry()
     {     {
-       // This example takes a color vector in  RGB values (3 values in the range 0 to 255) and applies it to all sides of the current prim+        ​// This example takes a color vector in  RGB values (3 values in the range 0 to 255) 
 +        // and applies it to all sides of the current prim
         llSetColor( <128, 240, 96> / 255, ALL_SIDES);         llSetColor( <128, 240, 96> / 255, ALL_SIDES);
     }     }
Line 39: Line 37:
 ===== See also ===== ===== See also =====
  
-  * [[llSetLinkColor]]  ​to set the color on any chosen prim in the current object.+  * $lfn[llSetLinkColor] to set the color on any chosen prim in the current object
 +  * $lfn[llSetAlpha] to change the opacity of a face in the current prim, or $lfn[llSetLinkAlpha] to change it for any chosen prim. 
 +  * The $lfn[PrimitiveParams/​|PrimitiveParms] family of functions, with $lct[PRIM_COLOR],​ allows changing color and alpha at the same time. 
 +  * $lfn[llSetTexture] and $lfn[llSetLinkTexture] to change the texture of this prim and of any prim in the linkset, respectively.