For blocking my trials, I have created two loops. One that changes the stimulus and one that switches the file the stimulus is from after a certain number of trials – thereby changing the block. I want to seperate the 3 blocks with a pause, but with the design you can see above, the pause also runs after all 3 blocks have been completed, which I don’t want. Does anyone know how I can only run the pause after the first two blocks?
It’s easy, have a code component in the pause routine that starts at 0 and increase by 1 every time the pause routine starts. Then add that if the counter reaches 3 the routine should end.
e.g.
#in the begin experiment tab
myCounter = 0
#in the begin routine tab
myCounter = myCounter + 1
if myCounter >= 3:
continueRoutine = False
Even more easily, you can specify the duration of the Pause routine using the blockswitcher loop if it’s not random, setting a variable like “duration” and using $duration for the component inside the Pause routine.