llGetLinkNumber

From Second Life Wiki
Jump to navigation Jump to search

Summary

Function: integer llGetLinkNumber( );
0.0 Forced Delay
10.0 Energy

Returns an integer that is the link number of the prim containing the script.

0 means the prim is not linked, 1 the prim is the root, 2 the prim is the first child, etc.

Caveats

  • By design may equal llGetNumberOfPrims, e.g., when prim is last, object contains multiple prims, and no sitting avatars

Examples

<lsl>default {

   state_entry()
   {
       llOwnerSay((string) llGetLinkNumber());
       llOwnerSay((string) llGetNumberOfPrims());
   }
}</lsl>

See Also

Functions

•  llGetKey
•  llGetNumberOfPrims

Deep Notes

Signature

function integer llGetLinkNumber();