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

LSL Wiki : llGetAlpha

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl801.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
Comments [Hide comments/form]
Since 1.6 this is not working as advertised. It returns the sum of the alphas of the faces. I have bug reported it, and it may change in an update.

I don't know if this is new or not, but if you apply a 100% clear (alpha'ed out) texture to a face the return from llGetAlpha() doesn't change.
-- EloisePasteur (2005-04-02 05:50:12)
bug report this ^_^
-- BlindWanderer (2005-04-04 14:51:52)
There's no reason why a side's alpha WOULD change if a clear texture is applied to it.
-- EepQuirk (2005-05-30 17:40:05)
hmm i don't think i was awake when i posted that comment, i have no memory of it...
-- BlindWanderer (2005-05-31 18:43:02)
Well, it's still broken, so I'm going to change this entry to make that clear.
-- OrdinalMalaprop (2006-02-21 07:10:37)
Attach a comment to this page: