Cause an enemy to take an appropriate amount of damage from multiple bullet collisions on the same frame?
I’m making a Shmup-style game and the default weapon of the player has twin shots. However, I noticed that my zombie enemies die in the same amount of hits no matter if one bullet hits or two bullets hit. I temporarily got around that by having the bullets alternate and shoot faster to compensate so that the bullets just land on separate frames and essentially do what I originally wanted.
However, as I added more to the game, eventually the player will get upgrades that will allow once more for bullets to land on the exact same frame and do less damage than it should. So I have the same problem again and no idea have to properly fix it.
For example, Zombie has 5hp and two bullets hit him on the same frame, he should be lowered to 3hp.
Following the previous example, when the Zombie is hit with two bullets on the exact same frame, he has 4hp as if only getting hit by one bullet.
Here is a screenshot of all the zombie code, including how the object reacts to colliding with the bullets.