LlDetectedLinkNumber

From Second Life Wiki

(Redirected from LSL llDetectedLinkNumber)
Jump to: navigation, search

Contents

Description

Function: integer llDetectedLinkNumber( integer number );
40 Function ID
0.0 Delay
10.0 Energy

Returns an integer that is the link number of the triggered event. If not supported by the event, returns zero.

• integer number Index of detection information


number does not support negative indexes.
For touch and collision categories of events only.

Specification

llDetected* functions can be called anywhere but will only return non-default values if called from within Detection events and functions called by Detection events.

Caveats

  • Events that enable the llDetected* functions always return at least one detected item.
    • Detection events are not raised if there is nothing detected (with the slight exception of no_sensor but it doesn't enable llDetected* functions).
    • The event detection count parameter value is initially never less than 1.
  • Will not work reliably with llVolumeDetect.

Examples

 
default
{
    touch_start(integer num_detected)
    {
        integer i = 0;
        for(; i<num_detected; ++i)
            llWhisper(0, "Link number clicked: " + (string)llDetectedLinkNumber(i));
    }
}
 

See Also

Events

•  touch_start
•  touch
•  touch_end
•  collision_start
•  collision
•  collision_end

Articles

•  Detected
Personal tools