How do I randomize certain stimuli in an excel file full of other stimuli?

I have 24 stimuli in total (all in the same excel file), but I can’t seem to figure out how to make sure only 12 is presented at the same time randomly

What I do is break the loop after the desired number of iterations. For example

if trials.thisN == 11:
     trials.finished = True

This code doesn’t work online in 2022.2.4 but is fine if you set version 2022.1.4 ( in Experiment Settings.

1 Like