How do I damage only 1 enemy on collision?

0 favourites
  • 3 posts
From the Asset Store
🙌 J-BoB Damage & Hit Sound Pack comes with 585 high-quality sound effects
  • So I've read through all the other posts covering this and for some reason still can't get this to work for me. I've done it before, but that was many years ago and I'm out of practice, but I know it's possible...

    What I am trying to achieve is have my Player shoot a projectile that damages an enemy on collision.

    This works, but the issue is that if the enemies are bunched up together then it damages multiple enemies. I've tried every version of pick an instance that I can think of and so far nothing has worked.

    This is what I currently have:

    Any suggestions on what I'm doing wrong would be much appreciated!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Solution: Shout out to FedericoCalchera in the Discord who gave me the solution.

    "the problem is that On collision runs once for each object that collided. So there's always just one instance picked.

    Is overlapping on the other hand would work in this case"

    So in short, I just changed the "On collision with another object" to "Is overlapping another object" and that solved it!

  • i would have just given the sprite an instance varible then subtract from that. its easeir i think.....

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