Difference between revisions of "LlGetLinkNumber"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 9: Line 9:
|caveats=*By design may equal [[llGetNumberOfPrims]], ''e.g.'', when prim is last, object contains multiple prims, and no sitting avatars
|caveats=*By design may equal [[llGetNumberOfPrims]], ''e.g.'', when prim is last, object contains multiple prims, and no sitting avatars
|constants
|constants
|examples=<lsl>default
|examples=<source lang="lsl2">default
{
{
     state_entry()
     state_entry()
Line 16: Line 16:
         llOwnerSay((string) llGetNumberOfPrims());
         llOwnerSay((string) llGetNumberOfPrims());
     }
     }
}</lsl>
}</source>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetKey]]}}
|also_functions={{LSL DefineRow||[[llGetKey]]}}

Revision as of 02:05, 22 January 2015

Summary

Function: integer llGetLinkNumber( );

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
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();