How would I make it so when an object collides with another it will be destroyed and respawn randomly on the layer?
Develop games in your browser. Powerful, performant & highly capable.
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.
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.