Difference between revisions of "LINK ROOT"

From Second Life Wiki
Jump to navigation Jump to search
(I always thought this was a stupid flag (considering the caveat) it's a wonder I didn't document it earlier.)
(missing desc)
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
|type=integer
|type=integer
|value=1
|value=1
|desc
|desc=Targets the root prim in the linkset.
|caveats=
|caveats=
*In a single prim object LINK_ROOT will not refer to the root prim!
*In a single prim object LINK_ROOT will not refer to the root prim!
**If your script needs to work in single and multiprim objects, instead of <code>[[LINK_ROOT]]</code>, use either <code>([[llGetLinkNumber]]() != 0)</code> or <code>(!![[llGetLinkNumber]]())</code>
**If your script needs to work in single and multiprim objects, instead of <code>[[LINK_ROOT]]</code>, use either <code>([[llGetLinkNumber]]() != 0)</code> or <code>(!![[llGetLinkNumber]]())</code>
**Alternatively, [[LINK_THIS]] works in both single-prim and multiprim objects, assuming the script is inside the root prim and only needs to refer to itself.
|examples
|examples
|constants=
|constants=
Line 20: Line 21:
{{LSL DefineRow||[[llSetLinkAlpha]]|}}
{{LSL DefineRow||[[llSetLinkAlpha]]|}}
{{LSL DefineRow||[[llSetLinkColor]]|}}
{{LSL DefineRow||[[llSetLinkColor]]|}}
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetLinkPrimitiveParamsFast]]|}}
|events=
|events=
{{LSL DefineRow||[[link_message]]|}}
{{LSL DefineRow||[[link_message]]|}}

Latest revision as of 16:09, 28 October 2023

Description

Constant: integer LINK_ROOT = 1;

The integer constant LINK_ROOT has the value 1

Targets the root prim in the linkset.

Caveats

  • In a single prim object LINK_ROOT will not refer to the root prim!
    • If your script needs to work in single and multiprim objects, instead of LINK_ROOT, use either (llGetLinkNumber() != 0) or (!!llGetLinkNumber())
    • Alternatively, LINK_THIS works in both single-prim and multiprim objects, assuming the script is inside the root prim and only needs to refer to itself.


Related Articles

Deep Notes

Search JIRA for related Issues

Signature

integer LINK_ROOT = 1;