Make my bullet go through enemies and damage them once

How do I make my bullet go through every instance of a group and damage them once ?
Actually, when i shoot, my bullet is hitting ennemies each frames, and they die fast :confused:

My way to approach this is to give each enemy an id, and the bullet a structure variable. When the bullet is in collision with the enemy, check if the enemy id is a child of the strutcure. If it’s not, add the id to the structure and give damage to the enemy.

1 Like

Here is how I tried (I’m sure what I did makes no sense don’t be mean ahah) and of course it’s not working (sorry this is the first time I go into things like that in gD)

Aside from what MrMen suggested, if you just want to prevent that the collision with the bullet is constantly checked, you can add a ‘Trigger once’ - condition in the same block as the ‘bullet is in collision with Enemies’ condition.

This is the first thing I tried, but the bullet isn’t hitting all enemies, when it hits one, the bullet ignores the enemies behind idk why

That may not work in this case. If 2 bullets strike enemies, or multiple enemies hit by tthe same bullet at the same time, then only one will be registered


Unfortunately all that’s doing is increasing the size of a number. I think you can get away with the following (untested though) :

1 Like

It works so well thank you for your time, you save my project !