Skip to content
lsl.devlsl.devLSL Dev

llSetRenderMaterial

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

Sets the material of this prim’s face. This function will clear most PRIM_GLTF_* properties on the face, with the exceptions of repeats, offsets, and rotation_in_radians.

How to use
llSetRenderMaterial("", 0);
Example 1
default
{
state_entry()
{
// the first material alphabetically inside the same prim's inventory
string material = llGetInventoryName(INVENTORY_MATERIAL, 0);
// set it on all sides of the prim containing the script
llSetRenderMaterial(material, ALL_SIDES);
}
}
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.