Don't click here unless you want to be banned.

LSL Wiki : llGetAlpha

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org
float llGetAlpha(integer face)

Returns the alpha (transparency) of the given face.

If face is ALL_SIDES, the value returned is the sum of alphas on all faces. To obtain the mean value, use the following:

float meanAlpha = llGetAlpha(ALL_SIDES) / ((float)llGetNumberOfSides());

Contrary to setting up the alpha of objects using edit mode, "alpha" in scripts is defined by a normalized float between 0 and 1 where 1 would be completely opaque, and 0 would be completely transparent.

Alpha can be set using llSetAlpha.

See also llGetPrimitiveParams.

Q: I have a 100% alpha texture that I applied to my object, but llGetAlpha is still reporting 1. What gives?
A: This isn't actually a bug. Rather, it's displaying the texture as you've applied it at 100% visible. The fact that the texture itself is completely alpha doesn't change that fact. Regardless of how it appears on the client, the sim itself has no idea what a texture looks like.

Q: How do I determine which side of an object this applies to?
A: See side.


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Texture
There are 5 comments on this page. [Display comments/form]