Can I fade an image based on input from my player?

I´d like to fade an image based on how much health the player has. In blueprints I would create a timeline and lerp between the two values.
In the UMG/UI I know how to create animations but I need the animation to take 2 input values and I don´t know how to do this. Is there a way to do it in the UMG blueprint? I find a Lerp node but not a timeline node…

There’s no timeline component in widgets.

If this must be a timeline, have it play in the player and feed the widget appropriate, resulting data. I assume it’s supposed to be an animated fade with a very specific timing, right? Because that’s what timeline are for.

If the fade lasting X seconds is not a requirement, you could interpolate on Tick instead, and let the fade arrive at the desired value. You can control the speed of the interpolation.


Widgets kind of do have a timeline in the form of animation, have a look here for how to make it work with lerp:

Essentially, you play an animation and treat its progress as alpha. The feature is not that well documented, though.