llSetObjectName
Revision as of 22:20, 8 July 2011 by Strife Onizuka (talk | contribs) (Felt like a little more could be said.)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llSetObjectName( string name );203 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Sets the prim's name according to the name parameter.
• 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
- The name is limited to 63 characters. Longer prim names appeared cut short.
Attachment Names
- While an attachment is attached, the script cannot change the name of the attachment as it appears in the user's inventory. This is intended to reduce user confusion when searching for attachments.
- Changes to the name of the root prim (with llSetObjectName for example) will not be saved to inventory; if the attachment is detached (to inventory, not dropped) this name change is discarded and the name in inventory is used instead.
- Dropping an attachment (to the ground) and taking it into inventory will cause the inventory name of the attachment to be the changed name.
- Changes to the names of child prims will be saved back to inventory when the object is detached to inventory. They survive detachment.
Examples
<lsl>default {
state_entry() { string yyyy1mm1dd = llGetDate(); string name = yyyy1mm1dd + " " + llGetObjectName(); llOwnerSay("llSetObjectName(\"" + name + "\")"); llSetObjectName(name); }}</lsl>
See Also
Functions
• | llGetObjectName | – | Get the prims name | |
• | llGetLinkName | – | Get a linked prims name | |
• | llGetObjectDesc | – | Get the prims description | |
• | llSetObjectDesc | – | Set the prims description | |
• | llGetObjectDetails | – | Get a list of object details |
Articles
• | Limits | – | SL limits and constrictions |