Issue with routine not skipping online?

URL of experiment: Pavlovia

Description of the problem:
I’ve designed my experiment so that every ten trials, the participant receives a message of encouragement. I’ve done this by adding a separate ‘breakTime’ routine. I have a counter variable in a different routine to count how many trials the participant has completed. If this number is not 10, 20, 30, etc, then the breakTime routine should skip and the experiment should go on to the next trial. Whereas, if they have completed 10, 20, 30, etc trials then they should see the encouraging text.

This works perfectly offline. However, online it behaves oddly. On a trial where the break screen shouldn’t show, there’s a delay between each trial. It’s as if the breakTime routine is still happening but the text isn’t shown. The routine shouldn’t be happening at all in this scenario.
Also, when the experiment does reach the tenth trial, the breakTime routine does occur as excepted, however, every trial after that (11th, 12th) will also be followed by the visible breakTime routine with the same encouraging text visible. Is something not being reset?
How do I fix this?

This is my flow for this experiment.

This is the code component that sets the encouraging text in the breakTime routine.

Thank you!

That’s consistent with continueRoutine = False not working in a Begin Experiment block, which I think I’ve seen before.

What I did for this was have a variable duration for the text stimulus which I set to 0 if I want to skip.

1 Like

It seems that in online experiments “continueRoutine = False” needs to be called during every frame. As @wakecarter mentioned, it does not work if you put it in the beginning of the routine. Try either moving the whole thing to the “every frame” tab or use a variable to create a conditional in the “every frame” tab, which in case of being true runs “continueRoutine = False”.

1 Like