Repeated loop but with breaks
Hello everyone!
I came up with another question. This time I have created 2 different loops and I want each one of them to be played 5 times, but I also want the loops to appear in random order and after every trial to be a small break before the next one begins. Is there a way to make this happen without having to create 10 loops and put them play in randomized order??
Thanks in advance !😊
Comments
Hi @Vasileia_chr,
Based on your description, I understand that you want to present the 2 x 5 blocks of trials in a random order. This should be fairly simple to do by nesting your loops.
the idea would be to have a upper loop with two rows, with a variable coding for the condition to run (e.g. variable named "cond_to_run" and give it a value A on one row, and a value B on the other. You'd have to set the order of presentation of that upper loop to random and set it so that it runs for 5 cycles.
Within the sequence for that loop, you'd insert two loops with 5 trials each (your condition A and your condition B). If you want trials within these loops to be presented in a random order, set the selection to random.
You'd have to set the "Run if" of each of these loops so that it runs only if the variable from the upper loop is equal to a certain value (i.e., for loop A, you'd add the condition Run if [cond_to_run]=="A"; vice versa for condition B).
Regarding the breaks; I'm not sure I understand your message. You seem to want a break after every trial, but I wonder whether you actually meant at the end of each block of 5 trials. If the latter case, you'd simply have to add a sketchpad with a message telling your participant to take a break and press a key to continue after both loops inside the upper loop's sequence. That should provide a break after every block of 5 trials has been executed.
Hope this helps!
Fabrice.
PS: another way, more complicated, but useful if all of your trials are different (i.e., if you don't actually want the same 5 trials within Condition A and B to be repeated 5 times) and don't want to have to define 10 loops, would be to store all the trials information into arrays using code, and then populate the loops on the fly from that array.