I haven't looked through the entire source yet... nor comprehended (like me, you don't seem too found of explaining every little step :p) But this looks really neat. It's rather interesting how a simple addition (settargetname=) can give people exactly what they wanted.
But then I get ideas and such, and then I feel the need to resurrect old threads to discuss them.
Now your AI is very core based. The Ally alone knows what it is doing and who to do it to, at any given time. The Ally decides these things, and then performs them (only order of the kills determined by the environment).
Instead, we could probably do something like this
:state=5,activated=1:settargetname=AI1
:state=5,activated=2:settargetname=AI2
:state=5,activated=3:settargetname=AI3
:state=5,activated=4:settargetname=AI4
:state=5,activated=5:settargetname=AI5
now, if an enemy can "see" the player, or if an enemy can "see" the ally, the ally can know which enemy is attacking. Or ask the question "any attacking player" to an invisible floating skull, and get a response (activating the skull will send the notifications to any AIs in the room).
And it'd get really cool if you thus used "anywithin" on your "left" and "right" covers so that they told your ally which side would be best to take cover on.
Then, of course, your cover should tell every enemy "Oh, I'm hiding the ally" so that a series of commands can be executed that are designed to deal with that particular cover. (i.e. flanking)
If zones have been fixed, and activateallinzone now works, I see this as very practical... The way I illustrated is actually too complicated, there should be core "controllers" [zones that cover particular sections] and then "tactics advisers" [i.e. floating skulls :p] which ask questions to the environment [cover, ally, more floating skulls / zones] which may or may not tell the truth.
*shurgs* but even if you can now specifically target entities and send said data to them (or use a global var if you're willing to risk it) this is actually a bloody lot of work. Not only to script, but to set up...
*shrugs some more* this is, however, really neat for what it does. no more with the spinning allies that settarget to anything and everything then randomly fire around until they manage to hit something (which, of course, they didn't). And going further by making a reactive cover system = really neat.
Its not who you are or what you've done... its WHY you did it and how far you are willing to go.
If you fear speaking for yourself, make use the words of others while discovering your own voice.