How do I delete objects that are overlapping each other?

Get help using Construct 2

Post » Wed Apr 15, 2015 4:03 pm

Hi,
I created a level editor for my game and now when I import a created level in my game I let my game put the levels objects on the editor blocks that my editor made (with an for each command. Now when I start the game the for each command doesn't stop placing blocks so it places the blocks on each other. I wanted to delete the overlapping blocks so the blocks that are not necessary are gone and don't decrease the FPS. I tried it also with for each, is visible, is overlapping another object, on collision with another object and on collision at offset. But it always destroys all the blocks. At the moment I set an object count limit for each object type.
Is it possible to set the object count limit the same as the amount of editor blocks that have the frame for each individual object playing (the frames "show" the game where to place which block).
I coloured the levels objects in this text so you can distinguish it better. ;)
Thanks :D
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Wed Apr 15, 2015 4:20 pm

block is overpapping block
(add another condition)
pick bottom block .................................destroy
Image
B
62
S
23
G
7
Posts: 1,470
Reputation: 10,731

Post » Wed Apr 15, 2015 4:30 pm

In regards to your object count part of the question.

You would want to add some sort of checking event each time the user drops a block into the editor.

it would subtract the number of available blocks from the stockpile of that type of block. Then when it reaches zero, make that block type greyed out and unavailable to be picked.
B
79
S
37
G
13
Posts: 957
Reputation: 15,389

Post » Wed Apr 15, 2015 4:37 pm

Thanks!
I will try that soon! :)
Image
B
5
S
3
Posts: 193
Reputation: 1,063


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests