Making a Hud bar update on timer?

I’ve got a health bar system working and now I’m trying to adapt that to a timer system for a ‘timer hud bar’.

This is my Health setup. It all works great for adding/subtracting health, though it has one issue: Player doesn’t die at 0 HP, it always takes one more hit :frowning:

https://dl.dropboxusercontent.com/u//unreal/Health.jpg

This is the timer system I tried to duplicate, the timer works and it prints to screen the numbers ticking down. But it won’t send it to the hud bar.

https://dl.dropboxusercontent.com/u//unreal/timer.jpg

This might be a large part of the problem but I can’t figure it out:

https://dl.dropboxusercontent.com/u//unreal/HUD_Percent.jpg

These are both functions on the Hud BP. When I followed a video tut I was able to create the** Hud State Interface Message** for the Health Percent. However I can not do that again. The one I get now (dragging off the ‘get molt percent’ the only interface I get locks target onto SELF and I can’t get a reference to Player Character.

Any help appreciated :wink:

You need to test CurrentHealth after you have assigned the new “subtracted” value to figure out whether the player died from the current hit.

Thanks jwatte, I’ll try that here pretty soon. Crashed Unreal and lost all my progress, going smoother this time though :smiley:
edit: yeah that worked, just moved the <= and Branch to AFTER the new subtracted value. Thanks!

Solved the issue of not being able to get that message. The function inside the interface had same name as interface, so I couldn’t call the message. Changed it and now i can add message. :slight_smile:

Solved Timer to Hud. Used a different hud widget for health and timer bars. Seems one was having a hard time tracking the two functions from the interface.