How do I destroy only one

0 favourites
  • 4 posts
From the Asset Store
Footsteps SFX One contains 400 sounds of steps and jumps on different surfaces.
  • Hello,

    How do I prevent two objects together that are to be destroyed by the same bullet? (see attached .capx) It looks like a bug. Can anyone help me? Thanks!

  • The speed of your bullet is way too fast. You need to make it a more sensible speed for collision detection to work properly.

  • It's obviously the bullet that's moving too fast, so it has the time to collide with two blocks before being destroyed. I tried picking the block nearest to the bullet, or picking the first block that records a collision, but it looks like everything's still going too fast to work out.

    The only other way I could think of with my tired brain was to perpetually detect which block is the lowest on the screen and store its Unique ID (UID), and then make sure the bullet can only destroy the lowest block. This method works in your example file, but it might need to be adapted to your real game, and it might also not work at all then.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe you can take a look at this, it may be useful (or maybe not, but that's still a good thing to know

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)