Difference between revisions of "LlSensorRemove"
Jump to navigation
Jump to search
m |
|||
Line 24: | Line 24: | ||
} | } | ||
}</lsl> | }</lsl> | ||
The next | The next script is a more real-world example of a scanner that when touched will begin listing avatar names and distances, but will stop if no avatars are detected. It demonstrates the use of [[llSensor]]() when starting the scan, to avoid the initial delay of an [[llSensorRepeat]]() call. | ||
<lsl>integer scanning = FALSE; | <lsl>integer scanning = FALSE; | ||
default { | default { |
Revision as of 03:48, 15 September 2012
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llSensorRemove( );30 | Function ID |
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 script.
Caveats
Examples
The following basic example shows an object that when touched starts scanning for avatars in 10m every 30 seconds, and stops as soon as at least one is found, and returns their name. <lsl>default {
touch_start(integer x) { llSensorRepeat("", NULL_KEY, AGENT, 10.0, PI, 30.0); }
sensor(integer x) { key id = llDetectedKey(0); string name = llGetDisplayName(id);if (("" == name)