So I'm spawning and object on the screen say X(random (1280)),Y(random(720)) but I've got stuff in the middle of screen I don't want my object to spawn on top of. Any ideas on how to accomplish this?
Why not add a condition on your spawn and move instantly the object spawned ?
For example is your object overlap a sprite at the middle of the screen move it randomly to the right/left/top bottom of the object ?
Develop games in your browser. Powerful, performant & highly capable.
I guess you can put the overlapping condition before all the conditions. so your spawn mechanic will run correctly always.
I'll give it a try, thanks for the help, this forum always delivers.
Rather than create an object adding collision checks and resources I would use random with range...
example, random(50,200) will give a random between 50 and 200...
hope it helps...
I'll try that too, thanks Pixel perfick, your like my best beta tester.
Creating the range was the answer and it's giving me the resulted I wanted, thanks all.