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.
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.