Hello! I'm working on a multiplayer platform fighter kind of game, and I'm using a family for the attacks and player characters.
Mostly this has worked fine. But sometimes i've run into some issues when 2 collisions happen very close in time to each other. Right now this is what I've stumbled into. This is my respawn system for the player characters.
My attacks simply deal damage to the players upon collision. One of the attacks is a plain square sprite "punch" that appears instantly while the other is a bullet. The problem happens with the bullet: if both player 1 and player 2 shoot it towards each other when the bullet is enough to put their health to 0 and one dies just before the other one gets hit too, the second one does count as "dead" as I verified but they don't get moved outside the layout and respawned. They just stay there and hitting them starts giving them negative hp.
Now, this problem DOES get solved if I make the same mechanism for both player characters separately, so it's not a huge problem. But I want to know why it doesn't work just with the family, so I won't run into similar issues in the future.