Unofficial LSL Reference

[[functions:llsetlinkalpha]]


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:llsetlinkalpha [2014-01-05 11:41 SLT]
omei
functions:llsetlinkalpha [2015-02-04 17:56 SLT] (current)
sei See Also: +llSet[Link]Texture
Line 1: Line 1:
 +$nav
 ===== Function: llSetLinkAlpha ===== ===== Function: llSetLinkAlpha =====
  
 <code lsl2> <code lsl2>
- llSetLinkAlpha(integer link, float alpha, integer face)+llSetLinkAlpha(integer link, float alpha, integer face)
 </​code>​ </​code>​
  
Line 8: Line 9:
  
 === link === === link ===
-An integer value defining the link number of the prim to be affected. +$linkparam
- +
-The following special link definition constants are available:​- +
- * LINK_ROOT ​ refers to the root prim in a multi-prim linked set +
- * LINK_SET ​   refers to all prims +
- * LINK_ALL_OTHERS ​    ​refers refers to all other prims +
- * LINK_ALL_CHILDREN ​  ​refers to all children, (everything but the root)  +
- * LINK_THIS refers to the prim the script is in+
  
 === alpha === === alpha ===
-A float value between 0.0 and 1.0 being the degree of opacity1.0 being fully opaque.+$lty[floatvalue between 0.0 and 1.0 indicating ​the degree of opacity, with 1.0 being fully opaque.
  
 === face === === face ===
-An integer value defining the face of the prim to be affected. ALL_SIDES affects all faces.+$faceparam
  
 ===== Notes ===== ===== Notes =====
  
   * Note that the viewer shows transparency,​ not opacity, and it shows it in percentage. To convert from viewer transparency to an alpha value suitable for use with this function, use this formula: alpha=(100-transparency)/​100. For example, a transparency of 35% is an alpha value of 0.65.   * Note that the viewer shows transparency,​ not opacity, and it shows it in percentage. To convert from viewer transparency to an alpha value suitable for use with this function, use this formula: alpha=(100-transparency)/​100. For example, a transparency of 35% is an alpha value of 0.65.
-  * The function silently fails if 'face' ​indicates a face that does not exist, or if 'link' ​indicates a non-existent prim.+  * The function silently fails if **face** indicates a face that does not exist, or if **link** indicates a non-existent prim.
  
 ===== Short examples ===== ===== Short examples =====
Line 38: Line 32:
  
 <file lsl2 llSetLinkAlpha-example.lsl>​ <file lsl2 llSetLinkAlpha-example.lsl>​
-// This will cause all other prims of the current object to blink on and off continuously (appear and disappear)+// This will cause all other prims of the current object to blink on and 
 +// off continuously (appear and disappear)
 integer ​ flip; integer ​ flip;
 default default
Line 56: Line 51:
 ===== See also ===== ===== See also =====
  
-  * [[llSetAlpha]] +  * $lfn[llSetAlpha] ​to affect only the current prim. 
-  * [[llSetLinkPrimitiveParams]] +  * $lfn[llSetColor] to set the color of a face in the current prim, or $lfn[llSetLinkColorto set it for any chosen prim. 
-  * [[llSetLinkPrimitiveParamsFast]]+  * The $lfn[PrimitiveParams/​|PrimitiveParams] family of functions, with $lct[PRIM_COLOR], allows changing color and alpha at the same time. 
 +  * $lfn[llSetTexture] and $lfn[llSetLinkTexturecan also be used to change the texture to $lct[TEXTURE_TRANSPARENT]