LlGetLinkNumber: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
m add first example - print llGetLinkNumber vs. [llGetNumberofPrims]]
add caveat: by design does exceed (llGetNumberOfPrims - 1) when prim is last, object contains multiple prims, and no sitting avatars
Line 7: Line 7:
|return_text=that is the link number of the prim containing the script.
|return_text=that is the link number of the prim containing the script.
|spec
|spec
|caveats
|caveats=*by design does exceed ([[llGetNumberOfPrims]] - 1) when prim is last, object contains multiple prims, and no sitting avatars
|constants
|constants
|examples=
|examples=

Revision as of 04:49, 2 October 2007

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 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

Examples

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

See Also

Functions

•  llGetKey
•  llGetNumberOfPrims

Deep Notes

Signature

function integer llGetLinkNumber();