0 Favourites

How do I delete objects that are overlapping each other?

  • 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

  • block is overpapping block

    (add another condition)

    pick bottom block .................................destroy

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

  • Thanks!

    I will try that soon!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic Locked topic
204 2,616,215
Kyatric's avatar
Kyatric Construct Team Support
Unread hot topic
99 10,152
karshinkoff's avatar
karshinkoff
Unread hot topic
167 14,513
DMT2005's avatar
DMT2005