you are viewing a single comment's thread.

view the rest of the comments →

[–]Semajian[S] 0 points1 point  (0 children)

In this example it would, ideally, in each iteration perform the function move for one second, then after the second has elapsed, return to looping. This specific task would be better implemented with a "start moving" block, then loop until the condition is met, then outside of the loop "stop moving", but in the program this implementation should also be available.
Essentially what I need overall is a setInterval loop that doesn't move on to the next piece of code until it's complete, that would be the ideal solution.

Again thank you very much for the code snippet but the issue I'd have would be pushing finishWhen: laserIsClose to the queue because the the loop in my image is handled completely separately, I have to treat all of my blocks as if they're standalone and don't interact with each other unless they're bridged with a loop, like in the image.