Download

Foreach with array and Move Component To only moves the first item in the array.

Hi!
I trying to move a bunch of components thats stored in an array,
for each Item/Component in the array I would like to set the item as visible and then animate a slow “transition” of the components location, but for some reason this only happens to the very first item/component in the array.

I have checked multiple times to make sure that all my components are stored in the array and they are, there should be four.

Here is my blueprint:

Any ideas?

Your foreachloop is going to execute all elements instantly. Probably isn’t working because your movement takes time.

Try putting a delay in that covers the time it takes to move that distance.

Another option would be to pull each index of the array individually, where each time one finishes it pulls the next in line. Create a Current Index variable. Then get first index and Set Current Index, move unit, increment Current Index by one, move unit, etc.