How I can make enemies do not mix on a same image? Any posibilities ?
example
http://www.mediafire.com/view/jiiy3rxv653cknx/example.jpg
Develop games in your browser. Powerful, performant & highly capable.
You mean that they don't overlap?
How does the enemies spawn? Do you spawn 3 enemies at the same time?
Explain abit more of what you are trying to achieve.
When enemies come together and see only an enemy although there are several in the same place. Sorry my english
Something like this could work:
global number prevX = 0 +-----------------------------------+ | for each enemy ordered by enemy.x | +-----------------------------------+ |-------------------------------+ | system compare: loopindex > 0 | enemy: set x to prevX | enemy x < prevX + 32 | +-------------------------------+ |-------------------------------+ | | set prevX to enemy.X +-------------------------------+[/code:liwu97d1] That takes the enemies left to right and keeps them at least 32 pixels apart. For a game like yours you could handle the enemies left and right of the player separately so you'd push from the player.
I feel keep bothering. I got here
http://www.mediafire.com/view/nb856zghw6wxw5q/prevx.jpg