). The trick comes in the fact that I only want the security system to rez ONE follower drone per detected avatar.. But the drones are also programmed to halt the timer and wait 10 seconds should the avatar leave the land and decide to come right back, so just doing a "when the avatar is no longer on sensor, reset the already_rezzed variable for that avatar" kind of trick isn't a possibility, simply because he'd get a second drone over his head when he returned. AND since my sensor is not set to 0.001 repeat rate to avoid unnecessary lag, avatars could also possibly leave and come right back before the next sensor swipe, thus avoiding having another drone rezzed on them. (Yes, I know it's a long and complex explanation.. Please bear with me as I do not wish to expose my script to public view) This is a security breach window that I do not want on my system..
So right now, it works in what I consider to be a very messy way. There's a timer in the script that regularly clears the "currently_detected" list. The drones send their target keys back to the security system via llRegionSay() each time before the timer does the next clear(every 4 seconds to be precise). (and even though the listen params are as tight as they can be, I realize this is very inefficient..) Every time, the timer event compares all elements in the "exceptions" list(the one that prevents another drone rez on said avatar key while it's in the list) to the ones in the currently_detected list. If an entry is found within exceptions that is not within currently_detected, then that entry is deleted from the exceptions list.. Basically the drones keep telling the main system that they're still alive and still hunting their target. Once that's no longer the case, the specified key is removed from the exceptions list and another drone will be rezzed on that avatar next time.
That's how I ensure that 2 drones are never rezzed on the same target, and since they use llRegionSay(), other security boxes can also hear them and will add the key to their exceptions list.
I ask.. Can anyone think of a better and simpler way to achieve this? I really hate how messy I had to make this, but I could think of no other solution.. Please note that sending a message before the drone dies is also not a solution.. Because messages are never certain to get through. If this happens with my current system, a second drone may be rezzed once in a blue moon.. But if removing the exception depended on it, that particular avatar would remain in exceptions forever, making them immune to the security.