for those that don't like reading the scripting language but want to know what I'm trying to do, this is a basic explanation of the logic of my script. I made this for my benefit to keep things straight in my head but figured I'd share =)
ment for lev 1-3 robots.
if sees an enemy, "locks on" to that enemy. Will chase and attack only that enemy for as long as that enemy is visible.
stops moving before humping robot. Stand next to enemy robot if enemy not moving.
if lose sight of locked on enemy, and no other enemies in sight, go to last known location of enemy (in hopes that the enemy merely turned a corner and sight
was lost for a brief instant). If still no enemies in sight, move randomly.
if see doll, broadcast a SOS! to all friendly units (requires radio) and immediately move towards doll while still attemping to fire at locked on enemy.
Once doll is retrieved, continue persuit of locked on enemy.
(requires a radio) if receive an SOS!, check if currently engaged with an enemy. If not, head toward broadcaster's position. If encounter an enemy along the way, will stop to engage that enemy.
one thing I'm still trying to implement is keeping track of the doll. So like if someone broadcasts an SOS! telling me they see the doll, store that location and then if there is ever a break in the battle due to killing your enemy or simply losing sight of them, go to that spot rather than moving randomly. But I realize I'm breaking some other part of my script every time I try to implement it =\
any other suggestions for improvement to the ai is very welcome, but remember the commands are limited this early on ie:
the ai doesn't know how much damage its taken
doesn't know how much damage its done nor how weakened an enemy is
doesn't know how far it is to the enemy
doesn't know when its being attacked, nor by who
doesn't know who the closest enemy is. In fact, the only enemy id you get is the enemy that is furthest from you that you can still see.