I've made a system to make the enemy follow my player on a 4direction movement base and avoid walls, it works ok for 1 enemy but as soon as I try to clone it and add some others bad guys, things get messed up.
Here's my capx https://dl.dropboxusercontent.com/u/55828593/simpleAI.capx if anyone can help.
Your global variable "dir" should be an instance variable of the ennemy sprite to be unique to each ennemies
Develop games in your browser. Powerful, performant & highly capable.
thanks, how I missed that >_<