Difference between revisions of "LlGetLinkNumber"

From Second Life Wiki
Jump to navigation Jump to search
m (link with llGetKey)
m (add first example - print llGetLinkNumber vs. [llGetNumberofPrims]])
Line 9: Line 9:
|caveats
|caveats
|constants
|constants
|examples
|examples=
<pre>
default
{
    state_entry()
    {
        llOwnerSay((string) llGetLinkNumber());
        llOwnerSay((string) llGetNumberOfPrims());
    }
}
</pre>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetKey]]}}
|also_functions={{LSL DefineRow||[[llGetKey]]}}

Revision as of 04:44, 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.

Examples

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

See Also

Functions

•  llGetKey
•  llGetNumberOfPrims

Deep Notes

Signature

function integer llGetLinkNumber();