D
Doooooli
Guest
So i've making this platformer game, where the player can shoot bullets! and it works! Now i've also added local coop, so you can play 2 players! And that works aswell!
But my problems is the following:
I want the players to be able to shoot at each other to gain health! Since the ammo is ham it works like a health thingy!
So i have a collision event with the bullet in my characters which has a basic hp += 1;
and that works, it heals when it touches the other player! But what the problem is it is also healing the caster aswell :/ doesn't matter where or how i shoot the ham, it still heals the shooter! So if player 1 has 10 hp and shoot player 1 will gain 1 hp and get 11 hp, and that's not what i want! I want only player 2 to be able to recieve the healing and vice versa!
How would i fix that? thx
But my problems is the following:
I want the players to be able to shoot at each other to gain health! Since the ammo is ham it works like a health thingy!
So i have a collision event with the bullet in my characters which has a basic hp += 1;
and that works, it heals when it touches the other player! But what the problem is it is also healing the caster aswell :/ doesn't matter where or how i shoot the ham, it still heals the shooter! So if player 1 has 10 hp and shoot player 1 will gain 1 hp and get 11 hp, and that's not what i want! I want only player 2 to be able to recieve the healing and vice versa!
How would i fix that? thx