How To make a progress bar fill overtime?

Hi
How to create time bar that fill precentage gradually without using event tick? I know how to set the bar in widget and my character ref but I struggled with coding part.

without using event tick?

If you want something to update every frame so the transition looks smooth, you will need some form of tick. There’s no other way. You could set a target value for time and have interpolation arrive there. But that still needs to be updated and shown every frame.


If you don’t want to update every frame, you could use a timer and update it with desired frequency. But it will not be smooth.

On the other hand, depending on the UI type, it can be set to update much slower. A Retainer Box is the way to go here.


The easiest way is to feed the progress bar data directly:

331732-screenshot-1.jpg

But bound functions execute every frame anyway…

I tend to avoid using ticks and tried out nodes like “set timer by function name” but it didn’t work as well. I guess I will stick to event tick since it is just a time bar to unleash an ultimate attack.

“set timer by function name”

It would work but you’d need to call it every frame to have an updated result for the next frame; which defeats the purpose of not using tick. And there’s probably a more sensible approach.


People demonise Tick for the wrong reason.

You absolutely must use tick if you want frequent updates. The trick is to avoiding putting stuff there that does not belong, things that don’t need updating every frame. If the player health is not changing, there’s no reason to call for an update.

If you have a progress bar that will visually progress 60 pixels over 1s and you want to see that change, you must update it every frame.

You do not need to update the bar all the time. Set a new value for the bar, open a gate, let Tick take it to the target / desired value, close the gate. Flow control can help isolate unnecessary executions.

1 Like

Hi How to create time bar that fill
precentage gradually without using
event tick? I know how to set the bar
in widget and my character ref but I
struggled with coding part.

If by gradually you mean 10 times per second or slower, there’s no need for Tick, indeed. A timer would be better, sure.

This topic is quite old, but I’d like to thank you for suggesting the use of Gate nodes.

Like many, I’ve been conditioned to avoid using Tick at all costs…but like you said, it’s a tool that has its uses and people need to understand that. I’m getting great results by keeping gates closed until a progress bar actually needs updating, then closing it again afterwards.

I look forward to finding out what else I can use this strategy for in the future!