Skip to content
lsl.devlsl.devLSL Dev

LlSetObjectDesc

Looking for the current API? Open the llSetObjectDesc reference →

Wiki description

Sets the prims description

Caveats

  • Changing the object description does not trigger a changed event.

Examples

Set this prim's description Set the root prim's description
default
{
    state_entry()
    {
        llSetObjectDesc("NEW PRIM DESCRIPTION");
    }
}
default
{
    state_entry()
    {
        llSetLinkPrimitiveParamsFast(LINK_ROOT,
            [PRIM_DESC, "NEW ROOT PRIM DESCRIPTION"]);
    }
}

Notes

  • Object descriptions are often used to store data that needs to be protected from script resets (see, for example, Prim Attribute Overloading). However, descriptions are not immutable and can be tampered with by users or other scripts, either intentionally or accidentally, so this method should only be considered a last resort for data storage.
    • llLinksetDataWrite and associated functions are generally better suited for this purpose, because they allow for significantly more data storage and are much more secure against tampering.

See also: functions

Shared wiki helpers

The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.

Template:Issues/VWR-437

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|VWR-437|[[llSetObjectDesc]] and editor panel have different description string length limits|type=bug|resolution=wont}}

Template:Issues/SVC-3429

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-3429|Name or description change, of an attached object, is rolled back when object is detached|type=bug}}

Template:Issues/VWR-8761

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|VWR-8761|Cannot delete object description.|type=bug|dnc=*}}

Template:LSL Function/prim-desc

Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:

{{LSL Function/limits}}

{{#vardefine:caveats|{{#var:caveats}}
*The prim description is [[limit]]ed to 127 [[bytes]]; any string longer then that will be truncated. This truncation does not always happen when the attribute is set or read.
*The prim description may only contain printable ASCII characters (code points 32-126), except the pipe character '|', which is not permitted for historical reasons.{{Footnote|The pipe character historically has been used to separate fields in the serialized version of inventory and possibly other internal fields for prim parameters.}} All other characters will be replaced with one '?' character per illegal UTF-8 byte.
*Note that when people have "Hover Tips on All Objects" selected in the viewer's "View" menu, they'll see the object description pop-up for any object under their mouse pointer.  For that reason, it is good practice to only set human-friendly information in the description, e.g. keys and such.
*When an attached object is detached, changes made by script to the name and description (of the root prim) of the attachment will be lost. While the object is attached the name and description can be changed but it will not be reflected in inventory. This caveat does ''not'' apply to child prims.
}}

}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
! #var
! value
|-
{{VarPairTable|also_articles}}
|-
{{VarPair|caveats}}
|}
{{Footnotes}}
</noinclude>
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.