Difference between revisions of "LlSensorRemove"

From Second Life Wiki
Jump to navigation Jump to search
Line 9: Line 9:
|caveats=*If called within the [[sensor]] event then it also removes all of the sensor data that is accessed by the {{LSLGC|Detected|detection}} functions.  
|caveats=*If called within the [[sensor]] event then it also removes all of the sensor data that is accessed by the {{LSLGC|Detected|detection}} functions.  
|constants
|constants
|examples
|examples=<lsl>
default
{
    state_entry()
    {
        llSensorRepeat("", "", AGENT, 5, PI, 1); //Searches the agent in the range. 5 is the range (in meters).
    }
    sensor(integer num_detected)
    {
        llOwnerSay("Detected to: "+llKey2Name(llDetectedKey(0))); //Detects the name of the agent.
        llSensorRemove(); //Removes the sensor.
    }
    no_sensor()
    {
        llSensorRepeat("", "", AGENT, 5, PI, 1); //If agent is not in range of sensor, this will search the agent again.
    }
}
</lsl>
|helpers
|helpers
|also_functions=
|also_functions=

Revision as of 17:39, 19 August 2010

Summary

Function: llSensorRemove( );
0.0 Forced Delay
10.0 Energy

Removes the sensor setup by llSensorRepeat.

There are no parameters or return value for this function, as only one llSensorRepeat can be specified per prim.

Caveats

  • If called within the sensor event then it also removes all of the sensor data that is accessed by the detection functions.

Examples

<lsl> default {

   state_entry()
   {
       llSensorRepeat("", "", AGENT, 5, PI, 1); //Searches the agent in the range. 5 is the range (in meters).
   }
   sensor(integer num_detected)
   {
       llOwnerSay("Detected to: "+llKey2Name(llDetectedKey(0))); //Detects the name of the agent.
       llSensorRemove(); //Removes the sensor.
   }
   no_sensor()
   {
       llSensorRepeat("", "", AGENT, 5, PI, 1); //If agent is not in range of sensor, this will search the agent again.
   }

}

</lsl>

See Also

Events

•  sensor

Functions

•  llSensorRepeat Scans for agents or objects every time period

Deep Notes

Signature

function void llSensorRemove();