Sets the prim's name according to the name parameter.

Syntax

void llSetObjectName( string name );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

string name

If this function is called from a child prim in a linked set, it will change the name of the child prim and not the root prim.

Caveats

Examples

Set this prim's nameSet the root prim's name
default
{
    state_entry()
    {
        llSetObjectName("NEW PRIM NAME");
    }
}
default
{
    state_entry()
    {
        llSetLinkPrimitiveParamsFast(LINK_ROOT,
            [PRIM_NAME, "NEW ROOT PRIM NAME"]);
    }
}
Test if a string is valid as an object name
// Returns TRUE if 'name' is a valid object name, FALSE otherwise
integer isValidObjectName(string name)
{
    string original_name = llGetObjectName();
    llSetObjectName(name);
    integer valid_name = llGetObjectName() == name;
    llSetObjectName(original_name);
    return valid_name;
}

See also

Functions

Articles

Footnotes

  1. Whether or not this is a bug is still debated, regardless LL has said they will not fix it. This behavior was first recognized as a pain point in 2006 and only confirmed to be lava-flowed more recently (2011).