SOLVED Tweening while iterating through array

I want the text to do a specific tweening depending on the child at the specific index of an array. However, it seems to only tween according to the last child in the array. If I disable the event checking “two”, it plays the first tween:

Since the wait function seems to not work well in while loops, I tried to use the repeatEveryXSeconds extension, but that doesn’t seem to work when being activated from a button press:

A couple of things to note:

  1. You’re not removing any existing tween before you tween again. Add an action to remove the size tween before you tween the text size. Not doing so will cause issues in the way it works.
  2. I think wait doesn’t wait for the whole repeat loop - it waits for the event’s actions and keeps processing the rest of the game events.

Instead, I’d do something like:

1 Like

Ohh, I see. I didn’t know you had to remove the tween. Thank you!