Skip to content
lsl.devlsl.devLSL Dev

LlGetAlpha

Looking for the current API? Open the llGetAlpha reference →

Function notes

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

Return value notes

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

Examples

//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;
        }
    }
}

Helper functions

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);

See also: functions

Shared wiki helpers

The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.

Template:Interval

Original shared helper source (conditional wiki logic is not evaluated)
{{#ifeq:{{Template:Interval/Footnote{{#var:lang}}}}|[[Template:Interval/Footnote{{#var:lang}}]]|{{#if:{{Interval/Footnote}}}}}}{{HoverText|{{Interval/Text|gt={{{gt}}}|gte={{{gte|}}}|lt={{{lt}}}|lte={{{lte|}}}|center={{{center|value}}}}}|{{Interval/Text2|gt={{{gth|{{{gt}}}}}}|gte={{{gteh|{{{gte|}}}}}}|lt={{{lth|{{{lt}}}}}}|lte={{{lteh|{{{lte|}}}}}}|center={{{center|value}}}}}}}<noinclude>

*{{Interval|gte=0.0|lt='''mag'''|lth=mag|center=return}}
*{{Interval|lte=0.0|gt='''mag'''|gth=mag|center=return}}

Parameters:
{|
! Parameter
! Description
|-
| {{{gt}}}
| Value is greater than this
|-
| {{{gte}}}
| Value is greater than or equal to this
|-
| {{{lt}}}
| Value is less than this
|-
| {{{lte}}}
| Value is less than or equal to this
|-
| {{{center}}}
| Center value in the hovertip
|-
| {{{gth}}}
| Greater than value in the hovertip, defaults to {{{gt}}}
|-
| {{{gteh}}}
| Greater than or equal to value for the hovertip, defaults to {{{gte}}}
|-
| {{{lth}}}
| Less than value for the hovertip, defaults to {{{lt}}}
|-
| {{{lteh}}}
| Less than or equal to value for the hovertip, defaults to {{{lte}}}
|}

</noinclude>

Template:Interval/Footnote

Original shared helper source (conditional wiki logic is not evaluated)
{{#if:{{#var:fnu_interval}}|{{#var:fnu_interval}}|{{Footnote|The ranges in this article are written in [http://en.wikipedia.org/wiki/Interval_(mathematics)#Notations_for_intervals Interval Notation].|The ranges in this article are written in Interval Notation.|handle=interval}}}}<noinclude>
{{Footnotes}}
</noinclude>

Template:LSL Function/face

Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:

{{#vardefine:header|{{#var:header}}{{#if:{{{nc|}}}{{#pos:{{#var:moded}}|r}}||{{#switch:{{NAMESPACE}}|Template=|User=|[[Category:LSL Face{{#var:lang}}]][[Category:LSL Face{{#var:lang}}/{{#if:{{{return|}}}{{{returns|}}}|Get|Set}}]]}}}}}}

{{#vardefine:ALL_SIDES|{{LSL Const|ALL_SIDES|integer|-1|hex=0xFFFFFFFF}}}}

{{#vardefine:p_{{{1|none}}}_desc|{{LSLGC|Face{{#var:lang}}|face}} number{{#ifeq:{{{notall|}}}|*||<nowiki> </nowiki>or {{#var:ALL_SIDES}}}}}}

{{#vardefine:p_{{{1|none}}}_hover|face number{{#ifeq:{{{notall|}}}|*||<nowiki> </nowiki>or ALL_SIDES (-1)}}}}

{{#ifeq:{{{notall|}}}|*||{{#vardefine:facechoise|If {{LSLP|{{{1|none}}}}} is {{#var:ALL_SIDES}} then the {{#if:{{{2|}}}|{{{2|}}}|function}} {{#if:{{{get|}}}|{{{get|}}}|{{#if:{{{ALL_SIDES|}}}|{{{ALL_SIDES|}}}|works on all sides.}}}}}}}}

{{#vardefine:header_footnote|{{#var:header_footnote}}{{#if:{{{!footer|}}}||{{PBR}}
{{#var:facechoise}}{{PBR}}}}}}

{{#vardefine:caveats|{{#var:caveats}}{{#if:{{{!footer|}}}|
*{{#var:facechoise}}|}}{{#if:{{{return|}}}{{{returns|}}}|
*If {{LSLP|{{{1|none}}}}} indicates a face that does not exist the {{#if:{{{2|}}}|{{{2|}}}}} {{#if:{{{return|}}}|return is {{{return|}}}| returns {{{returns|}}}}}|
*The {{#if:{{{2|}}}|{{{2|}}}|function}} silently fails if its {{LSLP|{{{1|none}}}}} value indicates a face that does not exist.}}}}

}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|ALL_SIDES}}
|-
{{VarPair|p_{{{1|none}}}_desc}}
|-
{{VarPair|p_{{{1|none}}}_hover}}
|-
{{VarPair|facechoise}}
|-
{{VarPair|header_footnote}}
|-
{{VarPair|caveats}}
|}
</noinclude>

Template:LSL Function/alpha

Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:

{{#vardefine:p_{{{1|none}}}_hover|from 0.0 (clear) to 1.0 (solid) (0.0 &lt;{{=}} {{{1|none}}} &lt;{{=}} 1.0)}}
{{#vardefine:p_{{{1|none}}}_desc|from 0.0 (clear) to 1.0 (solid) (0.0 &lt;{{=}} {{LSLP|{{{1|none}}}}} &lt;{{=}} 1.0)}}

{{#vardefine:also_articles|{{#var:also_articles}}
{{LSL DefineRow||{{LSLGC|Alpha|Translucent Color}} {{#switch:{{#if:{{{nc|}}}|Template|{{NAMESPACE}}}}|Template=|User=|{{LSLC|Alpha}}}}}}}}

}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|p_{{{1|none}}}_desc}}
|-
{{VarPair|p_{{{1|none}}}_hover}}
|-
{{VarPairTable|also_articles}}
|}
</noinclude>
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.