You would need to store the previous position.Y in a variable and then use the < and > in condition for next spawn...
Can you explain the second part further, I have stored the y position as a global variable. However I don't know how to do the second part.
Develop games in your browser. Powerful, performant & highly capable.
I guess instead of:
random(LayoutHeight - self.height)
Thanks a lot For some reason I thought random values can only be between 0 and another number.
You have to remember the variable is holding a number value in this case so it can be randomized as well.