Difference between revisions of "No sensor"

From Second Life Wiki
Jump to navigation Jump to search
m (lsl code tagging)
m
Line 1: Line 1:
{{LSL_Event|event_id=14|event_delay|event=no_sensor|event_desc=Result of the {{LSLG|llSensor}} library function call|constants|spec|caveats|examples=
{{LSL_Event
|event_id=14
|event_delay
|event=no_sensor
|event_desc=Result of a call to [[llSensor]] or [[llSensorRepeat]].
|constants
|spec
|caveats=*The script must have a [[sensor]] event, without it [[no_sensor]] will not be triggered. An empty [[sensor]] event is enough to satisfy this condition and cause [[no_sensor]] to be triggered.
|examples=
<lsl>
<lsl>
//List all avatars in range.
//List all avatars in range.
Line 8: Line 16:
     sensor(integer num) {
     sensor(integer num) {
           integer i = 0;
           integer i = 0;
           while (i < num) {
           do {
               llOwnerSay(llDetectedName(i) + " is " + (string)llVecDist(llGetPos(), llDetectedPos(i)) + "m away.");
               llOwnerSay(llDetectedName(i) + " is " + (string)llVecDist(llGetPos(), llDetectedPos(i)) + "m away.");
              i++;
          }while(++i < num);
          }
     }
     }
     no_sensor() {
     no_sensor() {
Line 20: Line 27:


|helpers
|helpers
|also_header|also_events|also_functions=*{{LSLG|llSensor}}
|also_header
*{{LSLG|llSensorRepeat}}|also_articles|also_footer
|also_events
|notes|mode|deprecated|cat1=Sensor
|also_functions={{LSL DefineRow||[[llSensor]]}}
{{LSL DefineRow||[[llSensorRepeat]]}}
|also_articles
|also_footer
|notes
|mode
|deprecated
|cat1=Sensor
|cat2
|cat2
|cat3
|cat3
|cat4}}
|cat4
}}

Revision as of 11:33, 25 May 2008

Description

Event: no_sensor( ){ ; }

Result of a call to llSensor or llSensorRepeat.


Caveats

  • The script must have a sensor event, without it no_sensor will not be triggered. An empty sensor event is enough to satisfy this condition and cause no_sensor to be triggered.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl> //List all avatars in range. default {

    on_rez(integer i) {
         llSensor("", "", AGENT, 100000, 10000);
    }
    sensor(integer num) {
         integer i = 0;
         do {
              llOwnerSay(llDetectedName(i) + " is " + (string)llVecDist(llGetPos(), llDetectedPos(i)) + "m away.");
         }while(++i < num);
    }
    no_sensor() {
         llOwnerSay("No avatars in range.");
    }

} </lsl>

See Also

Functions

•  llSensor
•  llSensorRepeat

Deep Notes

Signature

event void no_sensor(  );