integer llDetectedLinkNumber(integer number)
Returns the
link position (
0 for a non-linked object,
1 for the root (parent) of a linked object, 2 for the first child, etc.) of the object the
touch or
collision event is triggered for.
See also
llPassTouches and
llPassCollisions.
This is most useful for finding out which prim was
touched without having to put a script into each prim.
Note:
As of SL
1.6.7,
llDetectedLinkNumber will only ever return
0 when used with
llVolumeDetect, even when used in a multi-prim object. This may be caused by the fact that
llVolumeDetect was added some time after the original
detected functions. There is not yet any word on when this might be fixed.
Note to Note
Actually, I just tried it and when the llDetectedLinkNumber is in a touch_start event, and in an unlinked prim, it returns 0.
Note to Note to Note
I tried llDetectedLinkNumber in a touch_start event, and it worked perfectly well (As is is stated in the wiki.secondlife.com). No need to use the touch event.
Note
As stated in
llPassTouches
When passing touches, to determine what prim in the linkset has been touched, use llDetectedLinkNumber
in the parent prim.
Note about llDetectedTouchFace
llDetectedTouchFace will return the correct face of the child prim touched when used in conjunction with llDetectedLinkNumber.
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
Detected Functions |
Link