Hello as you read I need help with enemy AI I have been trying for a whole month and I have no good results.
Basically what i need is this:
-when enemy is at <200 (pixels) from player - enemy play attack animation(and stop)
-when enemy is 200-700 (pixels) from player chase player
-when enemy is >700 (pixels) from player walk a bit left then right (something that wouldnt make an enemy look fake)
My game is a 2d platformer ( side-scroller) And I guess thats enough information if its not just say.
Thanks in advance.