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.

Syntax

void llSetRenderMaterial( string material, integer face );

Forced delay: 0.2 seconds. Energy: 10.0.

Parameters

string material
a material in the inventory of the prim this script is in or a UUID of a material
integer face
face number or ALL_SIDES

If face is ALL_SIDES then the function works on all sides.

Caveats

Examples

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);
    }
}

See also

Functions