Don't click here unless you want to be banned.

LSL Wiki : llSensorRemove

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl809.us.archive.org
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
Comments [Hide comments/form]
How to do multiple Sensor scans. Suppose I have a detection system (not sensor based but for instance on collision or touch event) that registrates wether an avatar is in a building. The detection might not be repeated, while the avatar still resides within the building (for instance the avatar does not move and does not touch or collide into anything that might detect it's presence). So to know if the avatar is still in there, I call llSensor() with the name and key of the avatar to have a unique result.
Now, the problem is, how to do this when there can be multiple avatars, and you want multiple unique sensor results, can you do a call to llSensor for each avatar by name and key in a loop, and wait a small period of time to allow the sensor or no_sensor event to be raised?
How much time is there anyway between the call to llSensor and the sensor/no_sensor event to be raised?
-- a82-93-140-232.adsl.xs4all.nl (2007-08-08 07:41:29)
Perhaps you could write a function, and call that function within both the sensor and no_sensor event?
-- ool-18bf68ca.dyn.optonline.net (2007-10-04 12:56:03)
Attach a comment to this page: