Description of the problem:
Hi, I had no luck finding a way to terminate the loop after 4 correct responses in a row. Do you have any suggestions? my loop name is trials_voice, and my response component name is keyresp_sound.
So far I managed to terminate the task after they have 4 correct responses in total, but not in a row. Thank you.
js: Begin experiment
correctCount=0;
js: each frame
if (keyresp_sound.corr === 1) {
correctCount = correctCount + 1;
}
if ((correctCount === 4)) {
continueRoutine = false;
trials_voice.finished = true;
}