OS (e.g. Win10): Using MacBook Air (Model A1466)
PsychoPy version (e.g. 1.84.x): v3.1
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?: Inserting breaks within loop that shows images after every 20 trials
What did you try to make it work?: We inserted this code within our image loop using the coder component in the builder window
if trials.thisTrialN > 0 and trials.thisTrialN % 20 == 0: finish.trials = True;
What specifically went wrong when you tried that?: It gave us breaks when we need it to for the first time, but then it exited out of the loop. We need 1000 trials with breaks every 20 trials, this code gave the first break but then stopped showing the next set of 20 images.
We tried setting the nReps option to a higher number to make it show more images after the break, but in that case it started repeating images which is not an option for our experiment.
Include pasted full error message if possible. “That didn’t work” is not enough information.
There is no error message because the code executes fine, it just ends before we need it to end. This is a screenshot of our experiment in the builder, the screen is on the image trials loop.