http://dl.dropbox.com/u/26419994/problem.cap, here's cap. When player is moving everything works well, but when player's character stops and enemy is coliding with player, monster starts to "dance" around player. How to fix that? Thanks in advice.
Develop games in your browser. Powerful, performant & highly capable.
Hey MastaZavr. This can be fixed by putting a bit of a buffer around the required X coordinate. Now, the enemy will move only if the player is more than one pixel away from it.
The monster "over shoots" the player, try this.
Edit: Ah, beat me to it Cow_Trix!
Thanks guys! Now I can continue my project :)