I looked into the dumb ai biped, and as far as I can tell, they aren't running in any paticular direction, just the direction you face them in. In the a5 templates, the escape state was pretty much in any direction the player wasn't facing.
It wasn't the best way, since they got stuck in corners very easily, but it worked just fine for what I was using it for. I've always been interested in seeing some intelligent enemys running away from the player. I had planned on altering it and maybe using the robby the robot example from the aum example so that if they were stuck in a corner, to hault them from running from the player until they were no longer stuck in a corner.
I'm surprised there are so many pathfinding examples that show enemies how to get to the player using the best path, yet no examples on how to best escape from the player when they've taken too much damage. I'm not very great at coding, otherwise I would've tried to do it myself. It's still a shame though that the simpler escape state wasn't implemented in the new a6 templates, even if they got stuck in corners.
I have however been attempting to add in another state in the a6 templates and convert everything to how the a6 templates work, using the a5 escape state as an example.
So far, it sort of works, it calls the state based on their a skill that I set up to see if I can get them to run away at all, then later set it up based on health. It calls the state perfectly, they do turn away from the player, and walk away, sort of. It seems that the enemy gets very confused though. I think the problem is somewhere between the lines of seeing, and hearing the player. In the a6 templates for the enemy templates, it calls two different states when they can hear the player, and when they can see the player.
So when they can hear the player, they look for the player, using the hunt state, but when they can see them they run away, or if the skill is set otherwise, attack the player. I think what happens is that after they begin to run away, they start scanning to hear the player in a certain distance and it continiously loops back to whether or not the player is in hearing range rather than if they can see them. Since they are running away, of course they won't be able to see them after they get away at a certain distance. So they will stop. I've done something wrong but hopefully I can get this to work.
I'm sure it would work if I simply told the enemy to run away if they were in hearing or seeing range, but I'm trying to get them to continue what they were doing if they are no longer in seeing range, or in any actual danger.