So my character is playing as client 1 and i want to deal damage to client 2 when i attack and my sword overlaps, my problem is when i attack as client 1 my health decreases and vice versa, the image is from my character blueprint
Also i have no idea how inefficient or wrong i am with that cluster of custom events for server and multicast but it’s been working well for other stuff
Ok so looking back at this, I see that you’re trying to set your health in your HUD. Shouldn’t you be setting it in the character blueprint? This should fix a few other problems for you.
^^Try that first, then test.^^
If it still doesn’t work, then on the apply damage node, connect self to event instigator. After your health is set, get the display name of the event instigator. Make an append node, and connect it like this…
A-Display name of the event instigator
B- " Hit "
C- Self display name.
This should basically tell you if your own character is hitting himself somehow.
Thanks again but the problems still there, i don’t think i’m setting the health in the HUD just putting my other widgets there so i only need to cast to the HUD, been using print string and the clients definitely aren’t hitting themselves, now event any damage isn’t being called and if i skip it out and plug apply damage to the rest of the nodes only the first two clients have their health affected.
Yeah the health variable is setting the progress bar percent and the event any damage is being called it’s just not valid, but when i remove that i get an accessed none error from the HUD reference and the cast to HUD isn’t failing
There’s still a misunderstanding i’m setting the health which then sets the percentage.
What you’re saying is i should not set the percent but set the health variable (which i’m already setting) and somehow that alone will update the widget?
Or i should plug the health variable into set percent and (if everything is set up right) it will work?
The health bar does update it’s just going to the wrong client, also my cast to HUD works but accesses none