$nav ===== Function: llSetAlpha ===== llSetAlpha(float alpha, integer face) Sets the opacity (also called alpha) of a face or all faces of the current prim. ===== Parameters ===== === alpha === A float value between 0.0 and 1.0 being the degree of opacity. 1.0 being fully opaque. === face === $faceparam ===== Notes ===== * This function ONLY affects the prim the script is in. To change the alpha on another prim, use $lfn[llSetLinkAlpha]. * 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. ===== Short examples ===== llSetAlpha(0.5, ALL_SIDES); // will set all faces of the current prim to semi-opaque ===== Complete examples ===== default { state_entry() { llSetAlpha(0.0, 2); // Will make face 2 of this prim go transparent } } ===== See also ===== * $lfn[llSetLinkAlpha] to change the opacity on any chosen prim in the current object. * $lfn[llSetColor] to set the color of a face in the current prim, or $lfn[llSetLinkColor] to set it for any chosen prim. * The $lfn[PrimitiveParams/|PrimitiveParams] family of functions, with $lct[PRIM_COLOR], allows changing color and alpha at the same time. * $lfn[llSetTexture] and $lfn[llSetLinkTexture] can also be used to change the texture to $lct[TEXTURE_TRANSPARENT].