Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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:

    Click image for larger version

Name:	bp.jpg
Views:	1
Size:	228.2 KB
ID:	1139375


    Any ideas?

    #2
    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.
    Map Generator 1.0
    Map Generator 2.0
    Map Generator 3.0

    Comment

    Working...
    X