Difference between revisions of "LlGetTexture"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
m |
|||
Line 9: | Line 9: | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples=< | |examples=<lsl> | ||
//Tells the owner the textures on 6 sides | //Tells the owner the textures on 6 sides | ||
default | default | ||
Line 15: | Line 15: | ||
state_entry() | state_entry() | ||
{ | { | ||
integer i; | integer i = 0; | ||
integer max = llGetNumberOfSides(); | |||
llSay(0,"Side " + (string)i + " texture is: " + (string)llGetTexture(i)); | while(i < max) | ||
{ | |||
llSay(0,"Side " + (string)i + " texture is: " + (string)llGetTexture(i)); | |||
++i; | |||
} | |||
} | } | ||
} | } | ||
</ | </lsl> | ||
|helpers | |helpers | ||
|also_functions={{LSL DefineRow||[[llSetTexture]]|}} | |also_functions={{LSL DefineRow||[[llSetTexture]]|}} | ||
{{LSL DefineRow||[[llSetLinkTexture]]|Sets link's texture}} | |||
{{LSL DefineRow||[[llGetNumberOfSides]]|Gets the number of faces on the prim}} | |||
|also_events | |also_events | ||
|also_tests | |also_tests |
Revision as of 03:47, 14 December 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: string llGetTexture( integer face );57 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a string that is the texture on face
• integer | face | – | face number or ALL_SIDES |
If face is ALL_SIDES then the function works on all sides.
If the object is no-mod and the texture is not in the inventory, return a NULL_KEY.
If it is a texture in the object's inventory, return the inventory name, otherwise return the texture UUID.
Caveats
- The function silently fails if its face value indicates a face that does not exist.
Examples
<lsl> //Tells the owner the textures on 6 sides default {
state_entry() { integer i = 0; integer max = llGetNumberOfSides(); while(i < max) { llSay(0,"Side " + (string)i + " texture is: " + (string)llGetTexture(i)); ++i; } }
}
</lsl>See Also
Functions
• | llSetTexture | |||
• | llSetLinkTexture | – | Sets link's texture | |
• | llGetNumberOfSides | – | Gets the number of faces on the prim |