Skip to content
lsl.devlsl.devLSL Dev

llSetTexture

function
Function syntax
llSetTexture(
  1. string texture,// Name of a texture in the prim's inventory, or a UUID.
  2. integer face// Face number or ALL_SIDES. Values: Faces
);
Delay
0.2 s
Energy
10

Applies the Blinn-Phong diffuse texture to face of the prim.

Sets the Blinn-Phong diffuse texture of this prim’s face.

How to use
llSetTexture("", 0);
Example 1
default
{
state_entry()
{
// the first texture alphabetically inside the same prim's inventory
string texture = llGetInventoryName(INVENTORY_TEXTURE, 0);
// set it on all sides of the prim containing the script
llSetTexture(texture, ALL_SIDES);
}
}

From the issue templates included by the wiki article:

  • SVC-914 (bug): CHANGED_TEXTURE is not triggered when texture is changed via script
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.