Animate several widgets in order, in another widget?

Hey everyone

I have a widget of an inventory slot - these slots are placed in a Uniform Grid Panel within another widget (this pops up on mouseover).

I’d like the animation of the inventory slot widget (scaled 0-1 for a pop), to happen to each slot, in order from left to right.

I feel like I need a loop, and index the slots etc. But I’m having a very smooth brain weekend :skull:
I’m using 4.27

How would you do this?

Thanks, I appreciate any help

the problem with a for(each)loop iw, that it happens inside 1 frame only… so all your widgets will be animated at the same time…

to make them pop in order, you need to construct your own loop with an event.

first of all, make sure you crrated an animation sequence inside your slot widgets, that do the pop animation (called f.e. Anim_Pop).

now… in your main widget, that’s holding the grid:
Create a custom event.
Get the Grid’s children count and store it in a MaxInt.
Set a CurrentInt to 0.
now add a branch where you check if CurrentInt = > MaxInt.
On True, do nothing… the loop is done
On False:
Get the agrid GetChildrenAt and use the CurrentInt as value.
Cast the returned widget to your Slot widget.
Get the Anim_Pop from the cast return and PlayForward.
Now add a delay of X.X Seconds… you choose the delay between the Slot anims…
After the delay, add a ++ Node and increment the CurrentInt.
Now, sou drag the whole loop back to the beginning og the branch, to start this all over again… until the last grid child is reached.

Amazing, this worked perfectly - thank you so much!