Dynamic Change to UMG Animation duration

I’m part of an MMO development project. What I would like to do, is create one animation for buttons whose power is on cooldown, and then set the animation time to the appropriate cooldown period. Getting the cooldown time variable is simple enough, but can I set the animation, when begun, to use that time? Can I create a ten second animation that will play over five or fifteen seconds depending on the cooldown input?

I know this is possible for standard character animations. But what about the UMG animations, which are 2D instead and based on Flash animation principles? The animation cannot run in a loop - it needs to represent the actual progression of cooldown so the player can tell how soon he can use it again.

You can play your cooldown animation with infinite loop, and then, when cooldown is off, stop it and (optionally) reset to default state. I’ve created an example for you:

In this case, if you press 1 (let’s say you have a cool OP skill binded on ‘1’ key and want to use it) it will play cooldown animation and stop playing it exactly after skill cooldown is down (just hook up your delay variable into ‘Duration’ pin).

Not of use to me, unfortunately. I’ve edited my post to be clearer: the animation is meant to display the actual state of cooldown, not merely the fact that the power is in cooldown. It needs to serve as a visual timer, showing how much cooldown is left. So it has to go from point A to point B over the course of the recharge time. Assuming I use this method at all of course - I realize it may not be feasible.

As far as I know, it’s not possible with UMG animation system, but…
What kind of animation do you have? It would be possible to create cooldown-remaining indicators using e.g. progress bars layered on top of skill buttons.

I don’t have an animation yet, I’m exploring the possibility first. Honestly the animation would be quite simple. But while the progress bar is an interesting idea, I’m not sure it’s practical for this.

Here is what I mean:

93901-animation.gif

Any other animation would be possible to indicate current remaining cooldown if it was possible to change UMG animation speed from blueprints… But for now we can only set loop count. So maybe it’s worth mentioning as a feature request for Epic, on forums.

I did realize what you meant. The notion is intriguing but I suspect not viable for the circumstances. Still I’ll remember the trick.

The UMG animation is very different in principle from the ones they let you vary now. Still, worth asking.