llGetLinkNumber

From Second Life Wiki
Revision as of 04:49, 2 October 2007 by Ppaatt Lynagh (talk | contribs) (add caveat: by design does exceed (llGetNumberOfPrims - 1) when prim is last, object contains multiple prims, and no sitting avatars)
Jump to navigation Jump to search

Summary

Function: integer llGetLinkNumber( );

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

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

Caveats

  • by design does exceed (llGetNumberOfPrims - 1) when prim is last, object contains multiple prims, and no sitting avatars
All Issues ~ Search JIRA for related Bugs

Examples

default
{
    state_entry()
    {
        llOwnerSay((string) llGetLinkNumber());
        llOwnerSay((string) llGetNumberOfPrims());
    }
}

See Also

Functions

•  llGetKey
•  llGetNumberOfPrims

Deep Notes

Search JIRA for related Issues

Signature

function integer llGetLinkNumber();