|
Kittie Kline
Registered User
Join date: 22 Dec 2006
Posts: 1
|
04-29-2007 03:54
According to the LSL scripting Wiki thingy, "As of SL 1.6.12, there is a bug/feature where it can return agents/objects up to 300m away." I was wondering if it is true that llSensorRepeat works at up to 300 meters. I'm including a little test script I wrote to try it out. I just stick this script in a prim and touch it, and the prim floats up until it can no longer detect me, at which point it tells me the distance between us. The answer is always 95.99000005 meters. Do I have to do something special to get it to detect avatars further than 96 meters away, or is this note in the wiki just wrong/outdated? float SENSORDISTANCE = 300; vector agentposition; float TIME = .5; default { touch_start(integer total_number) { agentposition = llDetectedPos(0); llSetPos(agentposition + <0, 0, .99>  ; llSensorRepeat("", llGetOwner(), AGENT, SENSORDISTANCE, PI, TIME); } sensor(integer num) { llSetPos(llGetPos() + <0, 0, 1>  ; } no_sensor() { vector distancevector = (llGetPos() - <0, 0, 1>  - agentposition; llOwnerSay("Can detect avatars at up to: " + (string)distancevector.z + " meters."  ; llDie(); } } Thank you.
|
|
Kokiri Saarinen
Quoted for truth
Join date: 7 Jan 2006
Posts: 44
|
04-29-2007 04:22
Its not always present, and the distance is "maxxed" at about 300m, but usually ends up somewhere in between 96 and 300m when the bug is even working itself.
Essentially, its not reliable, but seems to work more often when the object is at higher altitudes. It may also be me, but it has also seemed to work less frequently than it did in previous versions of secondlife. Another interesting thing to note is that in the sensor event, the "distant" avatars are reported back as if they were the closest ^_^
-Kokiri
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
04-29-2007 06:34
The actual sensor maximum is 96m but a bug in the system allows it to sometimes detect avatars at greater ranges.
|