Faced with some strange behavior of the timer.
I need to make a delayed animation with the wave effect ... i.e. when you click on any sprite, other sprites to the left and to the right of it will start a timer with time as on a screen.
The array contains the UIDs of the sprites, ax variable of the sprite store the index in the array.
When I click on sprite, I loop through all the sprites, first to the left and start the timer with a time that increases with each iteration of the loop, same to the right.
The trick is that if you click, for example, on the 4th sprite, then the first 3 sprites on the left will react to it as expected, BUT the first 3 sprites on the right are not. The rest will also react normally.
Now the fun part. If to do so:
visually, everything works, but the data in the array is not updated...
Am I doing something wrong or what?
Demo project
P.S. same behavior in C2 :/