Is there a way to use Timelines with Widgets

Two things:

  1. You have to set your start and end values before entering the timeline. You can’t use the current score inside the timeline.

  2. Print works a lot better than the debugger. Try some print statements if you get stuck.

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

Then how to animate the score if I cant use it?

Is there a way to use Timelines with
Widgets

Yes.

  • 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.


  • or you can make a widget animation and use the resulting track as if it was a Timeline

You could sample animation on Tick to get results - poor man’s timeline but it’s sometimes necessary.

1 Like

Also, avoiding scripting in the LB. It’s a communication nightmare and if you ever want level2, you’ll have do the whole thing again…

There must be a current score, put that in a variable, and then the high you want to animate to in the other variable, then go into the timeline :slight_smile:

( or you can start it from zero etc )

Sorry very new, How do I add KeyFrames, and am I doing this right?

and where to put the animation is it on the levelBP Event Tick or the in the Widget Event Tick.
Will I have to call the animation first?

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?

Did you look at the first graph I think I did just that?
Im using TempScore at 0 and current score for the other

Hey, apologies for keeping you hanging but I won’t be around for some time now. Here’s a quickie of what I meant:

Some widgets are not exposed, but you can adjust it:

So you can push a value into a text block from the outside of the widget without having any script whatsoever in the widget itself:

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.

Hope this makes sense.

Good luck!

1 Like