How to animate a score ticker within a widget?

I want to animate a score that ticks up from a base score to include bonus points over a period of time, say 3 seconds.

At the moment I’m using tick but it’s too slow even with the delay set to something silly like 0.0001 seconds. Also; I don’t want to use tick.

I’m sure there must be a way to use the animate feature but I do not know how.

DEMO

This should work but I haven’t tested it.

Edit: The timeline is just this:

Hey. Thank for this! I will have a study and see if I can understand what’s happening and then give it a try :slight_smile:

So apparently, I can’t add a timeline to a UI widget :frowning:

Sorry I did not know that that is in a widget. The widget has animation on its own but in that case I would suggest you use the tick. Let me check and I’ll get back to you.

Edit:
Try this:


It looks like a lot but it’s just a bunch of simple math

Thank you for this.

Maybe I could still try your first method as this widget is on it’s own level so I could use the level blueprint, or even the level game mode blueprint, and just bind the text box to the total score variable?

Nah. It’s better in the widget. Keep in mind that widgets don’t tick if they are not drawn.

This might look intimidating but that’s because math looks too big in BP as each operation is its own node.

You can probably use the math nodes but it will be less clear.

Ah ok. Thanks for the clarification.

This worked beautifully :slight_smile: