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

LSL Wiki : llSetAlpha

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl423.us.archive.org
llSetAlpha(float alpha, integer face)

Sets the alpha ("opacity" or "transparency") value for face. If face is ALL_SIDES, sets the alpha on all sides of the prim (not the object; see llSetLinkAlpha). The alpha value is interpreted as an opacity percentage: 1.0 is fully opaque, and 0.0 is completely transparent ("invisible").

SL no longer clamps values smaller than 0.1 to 0.1 so object faces can be fully transparent (0.0) using LSL, but the built-in object editor still restricts the lower limit to 0.1. It's been theorized that this is either because the Lindens just forgot to change the other, or (more likely) that they want to discourage people who don't know what they're doing from rezzing invisible objects everywhere. Knowing what a script is (or better still, how to make it yourself) is a reasonable prerequisite to having fully invisible prims--not that that stops griefers, but it can be thought of as a way to prevent newbies from making too many mistakes.

When setting alpha to 0.0 (or just 0), be aware that the camera will not be focusable on the fully transparent object because of changes made to the camera behavior a while back, allowing users to zoom through a masked alpha texture (partly as a way to avoid a form of griefing store owners). To zoom in on a completely transparent object, (or to just edit the object, edit a visible object, then click on the invisible one--or hold alt to highlight transparent objects) a workaround to this is to set the alpha to .002 (or whatever, but that seems to be the lowest SL allows while still allowing zooming in on the object).

Invisible objects created using llSetAlpha can still be selected with the right mouse button, while an object with a 100% alpha texture can not be unless the user has transparent objects highlighted. Each method has its own advantages.

Example:
llSetAlpha(0.5, 0); // set the top of a cube 50% visible.
llSetAlpha(1.0, ALL_SIDES); // set entire prim 100% visible.
llSetAlpha(0.0, ALL_SIDES); // set entire prim 100% invisible.

Functions
llGetAlpha: get object's alpha settings
llSetLinkAlpha: set linked object alpha
llSetPrimitiveParams

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

Q: If I use this on an attachment, will it make my avatar invisible?
A: No. You can't make your avatar invisible with this method but there is a specific texture that can at a specific UV offset.


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

Functions | Texture | Alpha
Comments [Hide comments/form]
"You can't make your avatar invisible with this method but there is a specific texture that can at a specific UV offset."

could anyone direct me to what this is referring to?
-- PhooieFeng (2006-07-26 02:06:56)
If you are interested in going "invisible", get the invisbility prim (IM me Phooie, in game.)
-- BirdRaven (2006-07-26 15:43:21)
or run this on any prim:
llSetPrimitiveParams([PRIM_TEXTURE, ALL_SIDES, "38b86f85-2575-52a9-a531-23108d8da837", <0,0,0>, <0.475, 0.5, 0>, 0.0, PRIM_BUMP_SHINY, ALL_SIDES, PRIM_SHINY_NONE, PRIM_BUMP_BRIGHT]);
llSetAlpha( 1,ALL_SIDES );
-- AdamKaupas (2006-09-26 14:15:43)
What is the built-in delay on this function?
-- GwynethLlewelyn (2007-08-23 18:29:26)
Same as the two functions that make it up. llSetPrimitiveParams and llSetAlpha.
-- 000-019-533.area3.spcsdns.net (2007-11-05 06:40:21)
Attach a comment to this page: