URL of experiment: not online yet - pilot
Description of the problem:
The “trials” part of my experiment is composed of five rounds. I have added a screenshot so that you can have a better description. The participants should have the possibility to leave at any time of the experiment. In order to achieve that, I have added a keyboard response in the routine “trial” so that they can quit if they press ‘p’ and should then immediately go to the routine “cigarette length” without finishing the 5 rounds.
If they click on ‘p’ in the routine “trials”, they will go to the routine “feedback_stop” (this is already done), and then they should immediately go to the routine cigarette_length even if they did not finish the 5 rounds. I have tried to code this with trials.finished=true
in the tab end routine but this doesn’t work. I have also tried to add start_selected.finished=true
because there are two loops but this didn’t help.
In addition to that, if the participants complete one of the rounds, they will go to the routine “feedback_continue” where they should also have the possibility to leave without finishing the five rounds, also by pressing “p” but same problem, instead of ending the trial and going to the routine cigarette_length they go to the next round. I have tried to code this with the following code in the tab each frame:
if ((key_resp_4.keys === "p")) {
continueRoutine = false;
trials.finished = true;
start_selected.finished = true;
}
But this also doesn’t work.
I am working with the version 2020.1.2