| Radar Sensor. Detects a presence nearby, responds by turning on light in the object. | Contriibuted by Beezle Warburton |
| float scanDistance = 8; vector lightColor = <1.0,1.0,0.5>; float lightRadius = 5; |
Global variables |
| default { |
|
|
state_entry() { llSensorRepeat("", NULL_KEY,AGENT, scanDistance, PI, 2.0);} |
Repeat scan every 2 sec. |
|
sensor(integer num_detected) { llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, TRUE, PRIM_POINT_LIGHT, TRUE, lightColor, 1.0, lightRadius, 0.10]); } |
On detection, turn on light |
|
no_sensor() { llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, FALSE, PRIM_POINT_LIGHT, FALSE, lightColor, 1.0, lightRadius, 0.10]); } |
On no detection, turn off light |
| } | |
|
The Thinkerer
05/09/2008 Copyright (c) D. F. Dansereau & S. H. Evans |
LODScr | ||
| Famous fables | |||