Difference between revisions of "LlGetAlpha"

From Second Life Wiki
Jump to navigation Jump to search
Line 9: Line 9:
|constants
|constants
|examples=
|examples=
<pre>
<lsl>//Tells the owner the alpha on all sides
//Tells the owner the alpha on 4 sides
default
default
{
{
    state_entry()
    state_entry()
    {
    {
            integer i;
        integer i = 0;
            for( i = 1; i < 5; i++ )
        integer max = llGetNumberOfSides();
             llSay(0,"My alpha is " + (string)llGetAlpha(i));
        while(i < max)
    }
        {
}
             llSay(0,"Face "+(string)i+" alpha is " + (string)llGetAlpha(i));
</pre>
            ++i;
        }
    }
}</lsl>
|helpers
|helpers
|also_functions=
|also_functions=
Line 28: Line 30:
{{LSL DefineRow||[[llSetLinkColor]]|Sets link's color}}
{{LSL DefineRow||[[llSetLinkColor]]|Sets link's color}}
{{LSL DefineRow||[[llSetLinkAlpha]]|Sets link's alpha}}
{{LSL DefineRow||[[llSetLinkAlpha]]|Sets link's alpha}}
{{LSL DefineRow||[[llGetNumberOfSides]]|Gets the number of faces on the prim}}
|also_events
|also_events
|also_tests
|also_tests

Revision as of 03:44, 14 December 2007

Summary

Function: float llGetAlpha( integer face );

Returns a float that is the alpha of face.

• integer face face number or ALL_SIDES

If face is ALL_SIDES then the function works on all sides. The return is in the range [0, 1]

Caveats

  • The function silently fails if its face value indicates a face that does not exist.
All Issues ~ Search JIRA for related Bugs

Examples

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

See Also

Functions

•  llSetAlpha Sets the prim's alpha
•  llGetColor Gets the prim's color
•  llSetColor Sets the prim's color
•  llSetLinkColor Sets link's color
•  llSetLinkAlpha Sets link's alpha
•  llGetNumberOfSides Gets the number of faces on the prim

Articles

•  Translucent Color

Deep Notes

Search JIRA for related Issues

Signature

function float llGetAlpha( integer face );