llSensorRemove();
Removes the
sensor set by
llSensorRepeat.
Note that unlike a
listener, there is no need to specify the sensor by key. This is because objects can only contain one sensor per prim.
Note: llSensorRemove() clears out all data of the
detection functions. So, always gather all data you need before calling this function.
Here's an example written by Aniam Ingmann explaining llSensorRemove():
Example:
default
{
on_rez(integer sp)
{
llResetScript();//Always make sure the owner is updated.
}
state_entry()
{
llListen(0,"",llGetOwner(),"");
}
listen(integer c, string n, key id, string msg)
{
if (msg == "sensor on")
{
llSensorRepeat("",NULL_KEY,AGENT,96,PI*2,.1);//Turns on the sensor to look for agents within 96m
}
if (msg == "sensor off")
{
llSensorRemove();//Turns off the sensor.
}
}
sensor(integer n)
{
//whatever you want to pop up when someone is detected in the sensor.
}
}
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions /
Sensor Functions