Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Security Orb problem... sensors working wrong?

Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
01-25-2007 09:03
I made a simple security orb for myself, and it seems to work fine for me. I gave a copy to a friend, and it's working unpredictably for her.

What is happening is this: Her land is in the corner of a sim. The orb does an llSensorRepeat and she has it at maximum range - 96.0 meters. I was of the impression that sensors could not see outside the current sim, and indeed when I used to have a 'corner lot' I could stand 2 meters from someone and the orb wouldn't see them if they were on the next sim. (the only wierdness I've noticed with my own orb is sometimes it will detect people over 100m away, even with the range set at 96)

In addition, when the orb does detect someone it uses llOverMyLand to see if they're, well, over the owner's land. So it will know not to bother anyone if they are not infact on the orb owner's land.

Finally, if someone is detected, is on the owner's land, and the orb is armed, it will give them a warning, then after 10 seconds it uses llTeleportAgentHome - after doing one last check of llOverMyLand, to ensure it doesn't try and boot someone after they have moved away.

So here's the problem: It is detecting people in the next sim and it is identifying those people as over her land! And then it tries to teleport them home! I went and tested it, I stood on the land in another sim, and sure enough the llSensor could see me, and the llOverMyLand erroneously identified me as on her property. Then it tried to teleport me. Now this where where it failed - I got a blue box that said 'You have been teleported home by xxxxx's security orb' but I also got an error message 'unable to teleport to destination - please try again in a few minutes.'.

So I think the llTeleportAgentHome function is not working because somewhere, LSL knows I'm not on the bot owner's land. But the other two functions - llSensor and llOverMyLand are not working right, certainly llOverMyLand is not right.

She's disabled the orb for now, but it's definately having a problem with llOverMyLand...and I'm sure llSensor isn't supposed to be able to see past sim borders.

Can anyone offer some pointers or tips on this? I guess the fact that llSensor is working aross sim borders is great, but llOverMyLand is giving unpredictable results when given a key that is in another sim.

Thanks!

-Atashi
Talon Brown
Slacker Punk
Join date: 17 May 2006
Posts: 352
01-25-2007 15:10
As someone who also codes security systems the first question that comes to mind is...why does she have it set to maximum scan range in the first place? Her land doesn't extend out that far, obviously, unless she's worried about people flying over which is... Ok, so not going there, just a pet peeve of mine.

Anyway, yes sensors can detect AVs beyond 96m but not in a reliable fashion so you can calculate each detected AV's distance from the orb and just discard those beyond 96m and as you've seen llOverMyLand can return a false positive if the AV is outside the sim. To fix that you can use:

CODE
if (llOverMyLand(detected_key) && llGetAgentInfo(detected_key) != 0)

Since llGetAgentInfo only returns data if the AV is within the same sim that construct will ensure the target is fair game.
Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
01-25-2007 20:54
Thank you! Yes I know what you're saying... I think 16m or 20m would actually cover her land completely. The llGetAgentInfo looks like it will solve the problem. And I'll add an instruction to disregard agents detected at beyond the maximum range.

-Atashi