Difference between revisions of "LlGetAlpha"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
Line 9: | Line 9: | ||
|constants | |constants | ||
|examples= | |examples= | ||
< | <lsl>//Tells the owner the alpha on all sides | ||
//Tells the owner the alpha on | |||
default | default | ||
{ | { | ||
state_entry() | |||
{ | |||
integer i = 0; | |||
integer max = llGetNumberOfSides(); | |||
llSay(0," | while(i < max) | ||
{ | |||
} | llSay(0,"Face "+(string)i+" alpha is " + (string)llGetAlpha(i)); | ||
</ | ++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
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: float llGetAlpha( integer face );50 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
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.
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 |