Difference between revisions of "LlGetObjectName"

From Second Life Wiki
Jump to navigation Jump to search
(<lsl> example)
Line 9: Line 9:
|caveats=*The prim name is limited to 255 bytes, any string longer than that will be truncated. This truncation does not always happen when the attribute is set or read.
|caveats=*The prim name is limited to 255 bytes, any string longer than that will be truncated. This truncation does not always happen when the attribute is set or read.
|constants
|constants
|examples=<pre>
|examples=<lsl>default
default
{
{
     state_entry()
     state_entry()
Line 16: Line 15:
         llSay(PUBLIC_CHANNEL, llGetObjectName() );
         llSay(PUBLIC_CHANNEL, llGetObjectName() );
     }
     }
}
}</lsl>
</pre>
|helpers
|helpers
|also_functions=
|also_functions=
Line 23: Line 21:
{{LSL DefineRow||[[llGetLinkName]]|Get a linked prims name}}
{{LSL DefineRow||[[llGetLinkName]]|Get a linked prims name}}
{{LSL DefineRow||[[llGetObjectDesc]]|Get the prims description}}
{{LSL DefineRow||[[llGetObjectDesc]]|Get the prims description}}
{{LSL DefineRow||[[llSetObjectDesc]]|Get the prims description}}
{{LSL DefineRow||[[llSetObjectDesc]]|Sets the prims description}}
{{LSL DefineRow||[[llGetObjectDetails]]}}
{{LSL DefineRow||[[llGetObjectDetails]]}}
|also_tests
|also_tests

Revision as of 14:11, 16 February 2008

Summary

Function: string llGetObjectName( );
0.0 Forced Delay
10.0 Energy

Returns a string that is the name of the prim the script is attached to.

Caveats

  • The prim name is limited to 255 bytes, any string longer than that will be truncated. This truncation does not always happen when the attribute is set or read.

Examples

<lsl>default {

   state_entry()
   {
       llSay(PUBLIC_CHANNEL, llGetObjectName() );
   }
}</lsl>

Notes

  • This function can will return "(Waiting)" sometimes.

Presumably the function queries the asset server for a predetermined time and returns "(Waiting)" if that elapses. It then silently proceeds to the next instruction. A work around therefore, might be to test object name is not "(Waiting)" after calling llGetObjectName.

See Also

Functions

•  llSetObjectName Set the prims name
•  llGetLinkName Get a linked prims name
•  llGetObjectDesc Get the prims description
•  llSetObjectDesc Sets the prims description
•  llGetObjectDetails

Articles

•  Prim Attribute Overloading

Deep Notes

Signature

function string llGetObjectName();