How do I make a bullet NOT destroy multiple sprites ?

  • Hi !

    I am very, very new to this software. My only experience with game making softwares was using The Games Factory about 15 years ago. So, sorry if I post dumb questions !

    I am making a turret defense game with the free version of construct, and will most likely buy the full version soon.

    I have placed my first turret and my first critters, and when testing collisions, my bullets destroys every single critter it collides with, even if it collides with multiples critters at the same time.

    I would like the bullet to destroy only one single critter at a time. I tried to swap on collision with overlapping, I tried to put both of them in the same event condition, I tried to play with collision boxes (1px => 3px => 5px for bullet and only the middle of the critter into the full rectangle being the collision)

    At the moment, critters are not supposed to overlap anyway, but it will happen very soon, so I would like to fix this issue now.

    How can I make my bullet destroy only one sprite at a time when it collides with more than one at the same time ?

    Thank you very much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • solution found :

    "A simple trick is to set the bullet to be invisible on the collision, and also add a check for visibility to the 'On collision' check. Since only the first target checked will have the bullet still visible, only one is eliminated."

  • I suppose the bullet gets destroyed on collision.

    Then just ...

    'Bullet' On collision with 'Sprite'

    'Sprite' pick top

    ...... 'Sprite' destroy

    ...... 'Bullet' destroy

  • Absolutely. Thank you for your reply

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