Hey, I’ve been using animations for my buttons, however I’ve noticed that I can’t use variables for values like I can in Blueprints, and therefore can’t have animations which change colour based on the values a user sets in another widget (like I can with global variables attached to component nodes). I’ve been using multiple images to get around this by just setting their render opacity in the animations, however this is clearly not the best approach. I then started wondering if I could use animations instead of timelines, where the value of something in an animation could be brought into the Blueprints and used to set a value in another node, but I could not find a way of doing this.
I’m mainly wondering how I would be able to lerp values in UMG Blueprints. Normally this would be done with a timeline, but there aren’t timelines in UMG, so I’m stuck. I’m asking this mainly because I want to animate the letter spacing of text in a button, but can’t do so in an animation, and it seems I can only do so with some kind of lerp thing in the Blueprints.
I have seen posts where people lerp values using Delta Time from the Tick node, but I’ve never been able to get this to work.
If the anim length is not equal to 1s, you can translate the range required. Besides that, you can have an actor play the Timeline instead and feed the widget the alpha curve.
Widget animations can actually produce events while the animation is playing, similar to the TL’s Event Track. Double click the key:
Thanks for the reply, however when trying both of these, it just snaps to the end and start of the animation instead of animating. In terms of the lerp, my animation length is 0.25, and these are the Blueprints. It snaps to the colours instead of lerping (as if I’m just setting them and not lerping).
It doesn’t seem to lerp properly, where it stays at A, or goes a bit to B.
As for the Trigger in the animation, that does the same thing. I must be doing something wrong. I also tried using the Repeater but can’t for the life of me figure out how it works.