I am generating enemies on my map randomly. Basically on start of layout I have
system create object x random (10,8000)
y random (0,500)
then I have system repeat 20x times. So this ones creates 20 enemies. the problem is that sometimes it generates same or really similar x or y so two or more sprites are touching each other which is something I want to prevent. Is there something I can do?
I was thinking something like. If there is collision between them then generate x and y again?