I found a small bug to where if any of the pawns and characters in my game, the health bar doesnt update right away although they are clearly taking damage. Is there any way i can fix this?
How are you calling the widget update?
- a bind delegate
- an update via the character on take damage
- direct bind in ui widget (worse option performance-wise)
Is it single player or multi player?
its a single player game and it updates when player or enemy takes damage
Are you using hit or overlap events to register the hit?
Have you tried putting a breakpoint on the update function (your set health bar function) inside the widget to see if it triggers with a delay?
Does a print string register the health to screen reliably?
you are not setting anything after the update function. The passed variables need to set your top progress before you use it. Otherwise it never changes (unless you are changing it in another function making the input pin redundant)
Ideally you would only need to pass in the current value and max value if the needed update and then update the ui accordingly.
the nodes for those are being used farther down the code so thats why they arent connected
I don’t know if this makes sense, but when i was looking at how the enemies hit the character, the health bar works well but its when the main character hits the enemies that it has that small update delay



