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
How would I make it so when an object collides with another it will be destroyed and respawn randomly on the layer?
on event object 1 collides with object 2
action destroy object 1
action create object 1 on the layer at x = random(Range), y = random(Range)
for Range, type in the minimum and maximum boundaries you want the object to spawn inside.
Develop games in your browser. Powerful, performant & highly capable.
Thanks! That helped alot! Is there a way to get the object not to spawn inside other objects?
you could check if the object is overlapping whatever object you don't want it to spawn in. if that happens, delete it and respawn it again.