Difference between revisions of "LlDetectedLinkNumber"

From Second Life Wiki
Jump to navigation Jump to search
(Localized to french)
(Undo revision 53730 by Gally Young (Talk) localized the wrong page)
Line 1: Line 1:
{{LSL_Function/detected/fr|Numéro_lien|Numéro_lien}}{{LSL_Function/fr
{{LSL_Function/detected|number|linkNumber}}{{LSL_Function
|func_id=40|func_sleep=0.0|func_energy=10.0
|func_id=40|func_sleep=0.0|func_energy=10.0
|func=llDetectedLinkNumber
|func=llDetectedLinkNumber
|return_type=integer
|return_type=integer
|p1_type=integer|p1_name=Numéro_lien
|p1_type=integer|p1_name=number
|func_footnote=Réservé seulement aux évènements {{LSLGC/fr|Touch}} & {{LSLGC|Collision}}.
|func_footnote=For {{LSLGC|Touch|touch}} and {{LSLGC|Collision|collision}} categories of events only.
|func_desc
|func_desc
|return_text=correspondant au numéro du lien ayant déclenché l'évènement. Si la fonction n'est pas reconnue par l'évènement, la fonction renvoie zéro.
|return_text=that is the link number of the triggered event. If not supported by the event, returns zero.
|spec
|spec
|caveats=*Ne fonctionnera mal avec [[llVolumeDetect/fr|llVolumeDetect]].
|caveats=*Will not work reliably with [[llVolumeDetect]].
|constants
|constants
|examples=
|examples=
Line 18: Line 18:
         integer i = 0;
         integer i = 0;
         for(; i<num_detected; ++i)
         for(; i<num_detected; ++i)
             llWhisper(0, "Numéro du lien touché : " + (string)llDetectedLinkNumber(i));
             llWhisper(0, "Link number clicked: " + (string)llDetectedLinkNumber(i));
     }
     }
}
}
Line 24: Line 24:
|helpers
|helpers
|also_functions
|also_functions
|also_events={{LSL DefineRow||[[touch_start/fr|touch_start]]|Evènement déclenché par un touché}}
|also_events={{LSL DefineRow||[[touch_start]]|}}
{{LSL DefineRow||[[touch/fr|touch]]|Evènement déclenché par un touché}}
{{LSL DefineRow||[[touch]]|}}
{{LSL DefineRow||[[touch_end/fr|touch_end]]|Evènement déclenché par un touché}}
{{LSL DefineRow||[[touch_end]]|}}
{{LSL DefineRow||[[collision_start/fr|collision_start]]|Evènement déclenché par une collision}}
{{LSL DefineRow||[[collision_start]]|}}
{{LSL DefineRow||[[collision/fr|collision]]|Evènement déclenché par une collision}}
{{LSL DefineRow||[[collision]]|}}
{{LSL DefineRow||[[collision_end/fr|collision_end]]|Evènement déclenché par une collision}}
{{LSL DefineRow||[[collision_end]]|}}
|also_articles
|also_articles
|notes
|notes
|cat1=Link/fr
|cat1=Link
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
}}
}}

Revision as of 16:07, 12 February 2008

Summary

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 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

  • If number is out of bounds the script continues to execute without an error message.
  • Events that enable the llDetected* functions always return at least one detected item.
    • Detection events are not raised if there is nothing detected.[1]
    • The detection event's items detected parameter is initially never less than 1.[2]
  • Will not work reliably with llVolumeDetect.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl> default {

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

}

</lsl>

See Also

Events

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

Articles

•  Detected

Deep Notes

Search JIRA for related 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.

Signature

function integer llDetectedLinkNumber( integer number );