Showing images stimuli with putting the breaks among them

If this template helps then use it. If not then just delete and start from scratch.

OS Monterey (Version 12.6):
PsychoPy version recent version
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:
I am working with Psychopy Builder to display 900 stimulus images. I want to insert breaks after every 150 images, ask a question, and collect a response after each break. To display all 900 images, I need a total of 6 breaks. Additionally, I plan to repeat this trial 10 times.
Currently, I have implemented the code to initiate breaks after every 150 images. However, it seems to work correctly only for the first 150 images. After that, it displays just one stimulus, asks a question, and then repeats the process.
The code I am using is:
myCount = myCount + 1
if myCount > 150:
trials.finished + True
Any help would be much appreciated!
Include pasted full error message if possible. “That didn’t work” is not enough information.

Try the following in your break routine within the main loop.

if myCount % 150 != 149:
     continueRoutine = False
1 Like

Hi, Thanks for your response. I put your suggested code within break-2 (question trial). Now it runs properly but doesn’t show the question after every 150 images. Could you guide me on how to solve it?