I’m trying to animate the score with a timeline and display it in a widget for a lose screen.
two problems, It doesn’t animate the Score and the value is not correct.
It might be because failed doesn’t see the Lerp because it’s finished.
I tried to put Failed on the update right after setting returned Text track but that returns 0
have the underlaying actor run the Timeline to update the widget (where you count the points anyway)
As a rule of thumb, you want to do as little in the widget as possible. It should be used to show stuff rather than do stuff.
Blockquote
how to update the widget with my Score variable? instead of print string?
underlying
Blockquote
is the widget on top and the actor(LevelBP) under it?
This circumvents any limitations widgets may have (like they do not Tick when they’re off-screen, for example).
So the Timeline lives outside of the widget, calculating precisely what’s needed but the widget is used for display only. No binding, no functions, no additional Tick.
You can also create your own ‘tick’ using “Set Timer By Event” instead of using a Timeline. Set Timer By Event, put time to 0.01, Max Once Per Frame, and looping.
I used Get World Delta Seconds for the delta time. Don’t forget to Clear and Invalidate the Timer when you’re done: