Conditional Branching?

Hi @Langers, you could add another routine after your consent page, that contains the exit message, and code for ending the experiment. You could make this routine display conditionally based on the response from the participant. If you add a keyboard component to the consent page, and a code component, then you could use the following code in the relevant tabs (see comments):

# Begin Experiment
exitExperiment = False

# End Routine
if resp.keys == 'n':
    exitExperiment = True

In the exit routine, add text component displaying your exit message with a duration of 5 seconds (suggested) and in the code component:

# Begin Routine
if not exitExperiment:  # Do not display routine if consent given
    continueRoutine = False

# End Routine
if exitExperiment:  # Quit experiment if consent not given
    core.quit()