LlSetObjectDesc: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Strife Onizuka (talk | contribs)
mNo edit summary
Strife Onizuka (talk | contribs)
mNo edit summary
Line 1: Line 1:
{{Issues/VWR-437}}{{Issues/VWR-3429}}{{LSL_Function/limits}}{{LSL_Function
{{Issues/VWR-437}}{{Issues/VWR-3429}}{{LSL_Function/prim-desc}}{{LSL_Function
|func=llSetObjectDesc
|func=llSetObjectDesc
|func_id=271|func_sleep=0.0|func_energy=10.0
|func_id=271|func_sleep=0.0|func_energy=10.0
Line 7: Line 7:
|return_text
|return_text
|spec
|spec
|caveats=
|caveats
*The description is limited to 127 bytes, any string longer then that will be truncated.
*The pipe character | is not legal in an object's description, it will be replaced by a '?'{{Footnote|This is because the pipe character historically has been used to separate fields in the serialized version of inventory.}}.
*When an 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. These limitations do ''not'' apply to child prims.
|constants
|constants
|examples=<lsl>//store the owner's name in the prim description
|examples=<lsl>//store the owner's name in the prim description

Revision as of 14:34, 19 July 2009

Summary

Function: llSetObjectDesc( string description );
0.0 Forced Delay
10.0 Energy

Sets the prims description

• string description

Caveats

  • The prim description is limited 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.[1] 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.

Examples

<lsl>//store the owner's name in the prim description default {

   touch_start(integer total_number)
   {
       string temp;
       temp = llKey2Name(llGetOwner());
       llSetObjectDesc(temp);
   }
}</lsl>

See Also

Functions

•  llGetObjectDesc Gets the prim description.
•  llGetObjectName Gets the prim name.
•  llSetObjectName Sets the prim name.

Articles

•  Limits SL limits and constrictions
•  Prim Attribute Overloading

Deep Notes

Footnotes

  1. ^ The pipe character historically has been used to separate fields in the serialized version of inventory and possibly other internal fields for prim parameters.

Signature

function void llSetObjectDesc( string description );