[solved] Correct usage of "Break if" field in a loop item
I'm trying to quit a practice block after 5 trials and then continue with the real experiment. I entered the following value in the "Break if" field in the hopes this would happen:
[count_trial_sequence] > 4 and [practice] = "yes"
I also had to manually set "count_trial_sequence" to 0 in a script item before entering the loop. Otherwise, OS would crash saying that this variable doesn't exist, probably because it hasn't entered the trial_sequence yet the first time the loop is run.
However, the practice block just keeps running! If I only enter
[count_trial_sequence] > 4
it does work (and the practice block only runs for 5 trials). However, OS also does not enter the experimental blocks anymore, because the count_trial_sequence value keeps incrementing, causing the "break if" statement to always be true in the experimental blocks. Hence I need to also check for [practice] = "yes".
What is the best way to approach this problem and only break out of the practice loop item after 5 trials? Thanks!