Jump to content

LlDetectedLinkNumber

From OSgrid Wiki
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function: integer llDetectedLinkNumber( integer number );

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
• llDetectedLinkNumber will return 0 in collision events of VolumeDetect objects (SVC-2996).
• 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.

Examples

<source lang="lsl">

default {

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

} </source>


See Also
Events
• touch_start
• touch
• touch_end
• collision_start
• collision
• collision_end
Functions
• llDetectedTouchFace