Destryoting object that is overlapping same type of object

Get help using Construct 2

Post » Sat Oct 25, 2014 8:05 pm

I started this little project simply out of boredom and curiosity. It's a small "level editor"(there isn't a game, so it's really only an imitation). I thought that it worked nicely and that, maybe, I could use it for my main project sometimes later.

Anyway, the problem is that when placing blocks, the ones below it don't get destroyed. I've placed a block counter in the layout, and since the block placing event triggers every 0.01s it places 6 blocks if you place only once. This problem didn'y really become evident until I implemented the basic radius function thingy. Thousands upon thousands of blocks would be placed in a matter of seconds. My laptop doesn't like it that much, and I'm sure other people's pc's would't like either.

I've tried doing:

Code: Select all
If block is overlapping another block destroy block


I'm not entirely sure if this piece of code destroys the block that is above or below, since in my case it does neither.

Of course, the capx: (sorry for the messy code, as I mentioned before, I did this purely out of boredom and curiosity)

https://dl.dropboxusercontent.com/u/267 ... ditor.capx

In short, I would like to know how to destroy all instances of an object that are below another instance of the same object upon creation.
Banned User
B
6
S
3
Posts: 105
Reputation: 1,170

Return to How do I....?

Who is online

Users browsing this forum: davidbox, Mayfly, zulerf and 8 guests