Flash ActionScript 2 game enemy AI. This script gives your enemies the ability to follow the player.
Customizable Enemy Settings
- movement speed
- turn rate
- aggression range
Update
Check out the updated version of this script that incorporates different enemy behaviors in to one function, as well as creating multiple enemies at the same time: Enemy Behavior – Run Away & Follow Player

I really found this fla useful but I’m a little stuck. I want to make more than one of these enemies but when I do that, only one of them follows. I am duplicating the enemy and putting it on stage at random.
Hi Werty2334, upload your fla somewhere, I’ll take a look.
I could use another one of these which explains how to get more than one too, it all works perfectly up-til you want more than one… could the enemy code be put in his own movieclip? thats what i was using before but now i want him to point at me too.
Thanks in advance
Hi Catalyst,
Check out http://www.freeactionscript.com/2009/04/enemy-behavior-run-away-follow-player/
-PR