How to make this UI Animation Loop Work?

I have a set of UI Animation Blueprint that works fine, but I want to refined these nodes with a loop event, they are :

The orignal nodes I want to refined.

The main part I want to loop, the integers I highlighted needs to loop 7 times.


Event_PlayAnim


The loop I tried, but this only works on the last animation ( index 6 )

Is there something I’m missing?


Also, you’re doing something the engine very specifically tells you not to:


Imho, a much better solution is to set up an Event Track Trigger inside the widget animation:

Each trigger on the timeline is an event (double click it).

2 Likes

Thanks for the reply, I will research how this Play Animation with Finsished event works in my loop.

As for the Get Actor of Class not to use per tick, I’m think on using Event Dispatcher to notify UI do animation, since my UI Animation is triggered when value changes from BP in the scene, the event track trigger seems not what I’m looking for. Or am I read it wrong ?

Some quick update, I tried Event Dispatcher and it works great.

I basically calls a dispatcher in the certain phase at the BP I need to reference, and reference it here in the UI Blueprint, If I’m not mistaken, it should works as :

Construct UI > Get BP in the scene ( only once ) > trigger Call ( in my case is array adds new item ) > Do Animation Event that reference from the BP I got previous.

I finally finsished the BP I’m looking for, here’s how it curret looks :

Only get actor at the construct stage to avoid getting actor in each tick, and created a dispatcher to trigger the UI Animation loop here.

Compare to previous one, these function works same with less nodes and easier to read.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.