Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I'm working on a top down game, i have items to be picked up that are spawned randomly around the layout. The problem i keep running into is that they sometimes spawn "on top of" each other. This causes problems:
1: looks tacky(bad)
2: bigger objects cover up smaller ones.
Is there a way to spawn multiple objects "at random" while avoiding Overlap?
Thanks in advance.
Run another event that checks if the objects are overlapping. If they are, pick one instance and destroy it, then recreate it elsewhere.
The only issue you'd face with this is that if the player ever sees the items spawn, then they have a chance of seeing the overlapping items for a single tick. To circumvent that issue you could give your items a fade in, active from the start, that is almost instant. That way they'll be invisible when they spawn for just a few ticks.
Develop games in your browser. Powerful, performant & highly capable.
Hey, thanks for the reply.
I tried to open your link, but C2 is telling me that it was made with version 125, and mine is 119.
I'm looking on the site, but i'm not finding 125...?
Thanks for the logic though, I'll try it out.
lol yeah, i just found it as you posted. Thanks though!