Difference between revisions of "LlGetLinkNumber"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
m |
m (Added the sentence that begins "Links are numbered in the reverse order ... This was taken from the "old" lsl wiki, which I assume to be in the public domain.) |
||
Line 3: | Line 3: | ||
|func=llGetLinkNumber | |func=llGetLinkNumber | ||
|return_type=integer | |return_type=integer | ||
|func_footnote=<code>0</code> means the prim is not linked, <code>1</code> the prim is the root, <code>2</code> the prim is the first child, etc. | |func_footnote=<code>0</code> means the prim is not linked, <code>1</code> the prim is the root, <code>2</code> the prim is the first child, etc. Links are numbered in the reverse order in which they were linked -- if you select a box, a sphere and a cylinder in that order, then link them, the cylinder is 1, the sphere is 2 and the box is 3. The last selected prim has the lowest link number. | ||
|func_desc | |func_desc | ||
|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. |
Revision as of 18:01, 28 October 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: integer llGetLinkNumber( );139 | Function ID |
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. Links are numbered in the reverse order in which they were linked -- if you select a box, a sphere and a cylinder in that order, then link them, the cylinder is 1, the sphere is 2 and the box is 3. The last selected prim has the lowest link number.
Caveats
- By design may equal llGetNumberOfPrims, e.g., 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 |