AI combat

how do i make an IA system when i have the enemy chase you down and when you get close to him he attacks you

an always sensor connected to a track to actuator and a motion actuator.

and a near sensor connected to whatever plays your attack animation.

since this is pretty trivial stuff you might want to start with something more simple.

Do A search for a blend file by Adam Wiseman called pathfinder

It a has an enemy that will chase you around and when it is in range it shoots at you. I parented my own mesh to the AI Empty and made a little doom style game( Daleks Of Doom) and it works pretty well.

Good Luck

Dr S