How can I smooth count down progress bar?

Hey,

I’m trying to create a countdown progress bar which starts at 1 and finishes at 0.

I’ve figured out how to get the seconds and minutes and I’m passing this through the HUD widget and doing a simple match to covert it between 0 and 1. I’ve also got this working a progress bar which goes down in line with the time left. However, the issues I’m having is that when the time goes down (second by second) the progress bar’s movement reflect the seconds, so its quite jagged. Is it possible to have a smooth transition between the seconds.

Below is the blueprint of the HUG function which binds the time to the progress bar.

One way I thought of was to bring in milliseconds? but I’m unsure if this is the right way.

Disclaimer, I’m a beginner :slight_smile:

Thank you :slight_smile:

You can try to convert your time to a float. Let’s say you want a Countdown of 5 seconds. Your starting float is 100. Let’s assume that we have a Framerate of 60. Then you Need to substract 100/300 seconds are 0.333 every Frame.
I know this is only a quick test. But i am not on my Computer, so i can’t try it for myself.
But you can try this. Of Course if you have another framerate you Need to multiply with Delta seconds…if i am right.

Thanks Beregron.

it looks like my time system was convoluted. I found a simpler solution by using the ‘set timer’ functionality:

Thanks for your help anyway.

Cheers,

Thank you!