Skip to content
lsl.devlsl.devLSL Dev

llDetectedLinkNumber

function
Function syntax
integer llDetectedLinkNumber(
  1. integer number// Index of the detection information.
);
Returns
integer
Energy
10

Returns the link number (integer) of the triggered event (touches and collisions only) specified by number. Returns 0 for non-linked objects, 1 for the root prim, and 2+ for child prims. Returns 0 if not supported by the event.

For touch and collision categories of events only.

How to use
integer result = llDetectedLinkNumber(0);
Example 1
default
{
// Drop this script into the root prim of of a build
// Touch any prim to learn its link number
touch_start(integer num_detected)
{
llOwnerSay("Link number clicked: " + (string)llDetectedLinkNumber(0));
}
}

From the issue templates included by the wiki article:

  • SVC-2996 (fs): llDetectedLinkNumber returns 0 with llVolumeDetect(TRUE)
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.