Setting specific intervals for Stroop trials

Hello !

I need to create an experiment with Stroop trials, these are the specificities:

General design:
-4 different blocks
-One cue per block: a cue is an image that show how much points or penalties the participant can get if they answer correctly or not, it’s like a condition. I have 4 in total.

Block design:
-Each block must consists of 15 intervals of Stroop trials.
-An interval is a time duration of 6 to 9 seconds (randomized).
-A stroop trial is when a word is presented and the participant has to give a keyboard response.
During an interval, I want the participant to be able to do as many trials as possible. This means that during the time period (varying from 6 to 9 seconds), they need to give as many answers as possible because I need to record reaction time and correct answers per second. They see a word, they respond on the keyboard with the color then they are presented with another one ect.

One experiment block is as follows:
-Participant see the cue
-Then there is a fixation cross
-Then one interval begin (6 to 9 seconds) and the participant answers as many times as he can.
-Then there is a fixation cross
-Then there is a feedback displayed with the score
-Then another interval starts repeating these steps.

I’ve only created one block so far, and I managed to display the intervals but I don’t know how to limit them to 15, they just keep going if I don’t leave the experiment.
I have a created a loop with my condition file for the stroop task, and I’ve set the number of repetitions to 15. This is my loop:

Could someone help me limit the number of intervals please ? It’s for a very important school project !

PsychoPy version: 2024.2.4
Online study: yes

Number of repetitions 15 means presenting all of your conditions 15 times each.

Oh okay! I guess what I want to do has nothing to do with the number of repetitions then. How should I do if I only want this loop (from fixation_start_interval to feedback_interval) to repeat 5 times ?

Assuming your spreadsheet has more than 5 conditions.

if intervals.thisN == 4:
     intervals.finished = True

It worked, thank you very much !