Trouble with parallel processing for a timer

I'm working on a puzzle that involves moving boxes along a conveyer belt. The idea is that there's five boxes that move in sequence and then loop. I've come up with an event that icrements a variable called 'timer' by one (ideally automatically on loop, but for debugging I have it ticking once whenever the player activates a lever). There are dummy events that are just where the graphics for the boxes show up, and then there are events running in parallel that set what the box should be for each timer value. Ideally this creates an illusion of boxes moving in sequence.

However this is majorly bugged, and I can't tell what exactly is going wrong with the scripting. The boxes don't move in the sequence they should, and the timer doesn't loop from 4 to 0. I've attached some images to help visualize this, including my scripting for each object.

1 is the overall set-up with events. 2 is the internal logic for each parallel process that sets the image value for the chests as they 'move' along the conveyer. 3 is the scripting the lever does to move the convery belt 1 tick. 4 is a guide I wrote to myself to put the boxes in the appropriate place depending on what the tick value currently is.
It's very difficult to read through this. It would be much more helpful if you didn't crop your screenshots down - just post the whole event editor window.

That way it's more understandable, and additionally we might see a setting that needs to be adjusted outside of the actual event commands.

For example, I can't see any wait commands, which means by default your event is trying to make the boxes move 60 times a second.
If the var TickIs starts with 0, it will never grow. Since you've set it to only grow if it is already at 4 or bigger.

Edit: I think you tried to do it the other way around: Resit if 4 or bigger, and grow if under for, right? Then change > into <
If the var TickIs starts with 0, it will never grow. Since you've set it to only grow if it is already at 4 or bigger.

Edit: I think you tried to do it the other way around: Resit if 4 or bigger, and grow if under for, right? Then change > into <
Huh? His screenshot 3 says
Code:
if TickIS > 4
  TickIS = 0
else
  TickIS += 1

That's correct logic. If it starts at zero, it will fail the first if check (it's not > 4), and the else will add 1. Next time it's 1 and becomes 2, etc. until it becomes 5, at which point it resets to 0.
Huh? His screenshot 3 says
Code:
if TickIS > 4
  TickIS = 0
else
  TickIS += 1

That's correct logic. If it starts at zero, it will fail the first if check (it's not > 4), and the else will add 1. Next time it's 1 and becomes 2, etc. until it becomes 5, at which point it resets to 0.
Not the screenshot I see:
1655933693527.png


Edit: Oh, but I was wrong, now I see it again. The > is indeed set right... Oopsie.
Edit again: I'm good at math, really... Even though it doesn't seem like that at the moment...

Original thread: https://forums.rpgmakerweb.com/threads/trouble-with-parallel-processing-for-a-timer.148789/