Skip to content
lsl.devlsl.devLSL Dev

llGetAlpha

function
Function syntax
float llGetAlpha(
  1. integer face// Face number or ALL_SIDES. Values: Faces
);
Returns
float
Energy
10

Otherwise the return is in the range [0, 1], with 0.0 being fully transparent and 1.0 being fully solid.

Returns a float that is the Blinn-Phong alpha of face.

How to use
float result = llGetAlpha(0);
Example 1
//Tells the owner the alpha on all sides
default
{
state_entry()
{
integer i = 0;
integer max = llGetNumberOfSides();
while(i < max)
{
llSay(0,"Face "+(string)i+" alpha is " + (string)llGetAlpha(i));
++i;
}
}
}
float AveragePrimAlpha()
{//Since this is so simple you may just want to inline it instead of including the function.
return (llGetAlpha(ALL_SIDES) / llGetNumberOfSides());
}
//if face 0 is "transparent" then make the prim "visible"
if (llGetAlpha(0)) ;
else llSetAlpha(1.0, ALL_SIDES);
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.