Hello all, multiple days on this. Thanks in advance for your help. Novice on replicated variables and trying to wrap my head around it. I will try to be clear, concise, and cogent.
I am attempting to implement a replicated healthbar in my multiplayer game so you can see how much health other players have.
I have followed this YouTube tutorial FWIW: Unreal Engine 4 Multiplayer (replicated) Health Bar Tutorial | UE4 Replicated Health Widget - YouTube
The good: I get the server updates and the client updates expected from within the widget blueprint I am attempting to update.
It even prints with the proper values I expect.
The bad: My player HUD healthbar [BP_UW_Health]
does not update on either the client (1) or server (0). The variables passed from the Character BP, both CurrentHealth
and MaxHealth
float variables are replicated.
Here is the variable flow from the lander to the healthbar blueprint into game.
Initialize the healthbar play hud in the Character_BP:
From within the Character BP
Calculate health and update replicated variables
on the server:
Get those server variables and update Character_BP
variables, then trigger a custom UpdateHealth
event that updates the required values in my healthbar user widget.
My Character_BP has a reference to the BP_UW_Health health bar UI widget in order to refence those variables.
I attempt to update the healthbar percent in the BP_UW_Health
widget and I thing this is where things go sideways.
According to the PrintString, I am receiving the correct values but they are not updating the progress bar percent as expected. Bar stays at 100%.
My health bar widget is in my Character_BP
stack and displays correctly in the game, but the progress bar is not updating. HELP!
(Thanks again in advance!)