Player character and players take damage at the same time

I finally got the player charter to give out damage and for the other players to take damage. But when I fire the gun, the player character is taking damage as well. How do I stop this, so that the other character is the only one taking damage?

i assume your using an overlap event for your bullet. if your doing a single player game then you could add a small bit of code to the overlap event thats checks if the overlapped character is the player. basically on overlap → other actor = player character → branch → if false execute the rest of the script, if true do nothing.

if you wanted to expand on this which you should in case you want the enemies to be able to shoot as well, then you will need to create a variable of type character and in the details panel check the box for expose on spawn. this will allow you to set the variable when the bullet is spawned into the world (via the spawn actor from class node). ok so now move on to where you are spawning bullets and on the spawn actor node there should be a new pin for your variable (you may need to compile first), drag off this pin and search for self to get a reference to self. now back in your bullet theres one last thing to do, switch the get player character node with the variable you created. what this all does is it sets the variable to the character that spawned the bullet, then we check to see if the overlapped actor is the one that spawned the bullet, if it is we skip the part for applying damage.

Yes, I was using overlap event for my bullet. Also, thanks I did want the other players to shoot back. Thank you so much, it all works out. Honestly anything but programming is my strong suit. Thanks again!!