Hi.
I’m working on a game, where I have two characters on top of each other to control.
(Play a prototype Here. Use Up/Down Arrow to jump, R to restart)
Right now, I’m kind of struggling with my HP/Life feature.
The thing is, I have a static int = 3(Number of lives), which decreases by 1 if any of my characters collide. But, when both of them collide at the same time, it decreases by two, I only want it to decrease by one, so you have 3 HP total for both. I have separate control-scripts for each of the two characters, and detect collisions between the character and obstacles using OnCollisionEnter.
Anyone have know of any way to fix this?