Difference between revisions of "LlGetTexture"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 9: Line 9:
|caveats
|caveats
|constants
|constants
|examples
|examples=<pre>
//Tells the owner the textures on 6 sides
default
{
    state_entry()
    {
        integer i;
        for( i = 1; i < 7; i++ )
        llSay(0,"Side " + (string)i + " texture is: " + (string)llGetTexture(i));
    }
}
</pre>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llSetTexture]]|}}
|also_functions={{LSL DefineRow||[[llSetTexture]]|}}

Revision as of 03:16, 14 December 2007

Summary

Function: string llGetTexture( integer face );
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

//Tells the owner the textures on 6 sides
default
{
    state_entry()
    {
        integer i;
        for( i = 1; i < 7; i++ )
        llSay(0,"Side " + (string)i + " texture is: " + (string)llGetTexture(i));
    }
}

See Also

Functions

•  llSetTexture

Deep Notes

Signature

function string llGetTexture( integer face );