Conditional Loop not working in Pavlovia

The loop thing is weird. The scheduling system the builder uses is actually the part of PsychoPy I understand the least, because I’ve always just hand-coded my own stuff. I need to dig into how loop termination works in general, since it clearly has a way of ending after, e.g., a set number of repeats.

I was actually just thinking that it might be the “FINISHED” status in particular that’s causing that part of the issue, but I’m not sure how to fix it. The status system can be weirdly finicky sometimes, in both Python and JS.

I noticed that in your actual experiment your key response windows are synchronized with visual cues (green versus other color shapes, it looks like?). I had a thought, and I haven’t tested it so no promises, but you could possibly check whether the corresponding color shape’s setAutoDraw is set to true instead of checking whether the status of the response object is set to FINISHED. You could even create phantom objects (background-color shapes) that tracked the timing of the response windows to do this, if what you have doesn’t work. It’s an ugly kludge of a solution and technically reduces temporal precision, but it should only do so at the level of frames, so if that’s an acceptable amount of error for your purposes it might solve at least that problem.