Multiplayer Health Bar Replication Issue

Got it WORKING!

Ok, as a novice I am sure I am doing things all kinds of wrong, BUT it works. I’ll continue to dig into replication and learn best practices. This is what I did:

  1. NOT using my UpdateHealthServer event on the server
  2. NOT using my UpdateHealth event on the owning client or as multicast.
  3. NOT using a reference to the BP_UW_Health widget blueprint in my Character_BP

I had a name over my character in the game that was working fine. I looked at the function to display the player name of other players. I noted the player name was coming from the Player State and therefore replicated.

I applied this logic to my health bar. My Current Health and my Max Health variables needed for my progress percent in the BP_UW_Health' widget are replicated. On tick, I call this function in the Character_BP` (using Character_BP as a generic term) and the replicated variables properly update the healthbar on all clients.

Image 017

Woot!

Let me know how this is all kinds of messed up and I will refactor, but it works!

1 Like