Syntax

integer llDetectedLinkNumber( integer number );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

integer number
Index of detection information

number does not support negative indexes.

For touch and collision categories of events only.

Return value

Returns a link_number (an integer) of the triggered event. If not supported by the event, returns zero.

Specification

llDetected* functions only work if called from within Detection events (collision, collision_start, collision_end, sensor, touch, touch_start, touch_end) or in functions called by Detection events. They will fail silently and return unusable values if called during other events.

Caveats

Examples

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) );       
    }
}

See also

Events

Functions

Articles

Deep notes

Issues

Footnotes

  1. The exception is no_sensor but it doesn't enable llDetected* functions.
  2. Like all event parameters, the user can overwrite the initial value.