LlGetLinkNumber: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Strife Onizuka (talk | contribs)
No edit summary
m <lsl> example
(7 intermediate revisions by 2 users not shown)
Line 3: Line 3:
|func=llGetLinkNumber
|func=llGetLinkNumber
|return_type=integer
|return_type=integer
|func_footnote=0 means no link, 1 the root, 2 or first child
|func_footnote=0 means the prim not linked, 1 the prim is the root, 2 the prim is the first child, etc.
|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.
|spec
|spec
|caveats
|caveats=*By design may equal [[llGetNumberOfPrims]], ''e.g.'', when prim is last, object contains multiple prims, and no sitting avatars
|constants
|constants
|examples
|examples=<lsl>default
{
    state_entry()
    {
        llOwnerSay((string) llGetLinkNumber());
        llOwnerSay((string) llGetNumberOfPrims());
    }
}</lsl>
|helpers
|helpers
|also_functions
|also_functions={{LSL DefineRow||[[llGetKey]]}}
{{LSL DefineRow||[[llGetNumberOfPrims]]}}
|also_tests
|also_tests
|also_events
|also_events

Revision as of 18:14, 2 January 2008

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 may equal llGetNumberOfPrims, e.g., when prim is last, object contains multiple prims, and no sitting avatars

Examples

<lsl>default {

   state_entry()
   {
       llOwnerSay((string) llGetLinkNumber());
       llOwnerSay((string) llGetNumberOfPrims());
   }
}</lsl>

See Also

Functions

•  llGetKey
•  llGetNumberOfPrims

Deep Notes

Signature

function integer llGetLinkNumber();