[solved] Break loop if one of two conditions presented
Hello,
I have another question regarding a second task I will present the participant. In this one, they're asked to remember a particular event.
I would like to present one of two conditions, randomly selected. I ask the participant to recall an event where they felt either sad or proud. I created a loop with a variable Condition with two values: ‘sad’ and ‘pride’. I then created a sequence with a form_text_display asking to recall an event in which they felt [Condition].
I want to leave the loop once one condition has been called, I don’t want them to remember one event for each condition. I also would like to tell OpenSesame that out of the 200 participants I aim to test, I want 50% in each condition.
Is it possible to do this in OpenSesame and if so, how can I do it? Does it require an inline_script or just playing around with the properties of the loop?
Many thanks for your help!

Comments
Hi Eglantine,
If i read it correctly you could just set the amount of cycles in your loop to 2 and set the amount of repeats to 0.5, in this way only one of the two conditions will be presented and the loop will end once it is presented. Make sure the order is set to random though.
If you want more control over the assignment of conditions (to be certain every condition is presented 50% of the time) you could also use the parity of the subject number as an indication which condition is presented. This is explained better than i could do it here
Hi there,
many thanks that is brilliant!
Does it mean I just need to add an inline_script in the loop to control the assignment with the parity of the subject number?
Yes that is correct, make sure to place the inline_script before the loop starts!
It's great!
Cheers!