How to set a number of trials less than the number of conditions in my conditions file

In my conditions file ive got 40 conditions and 4 parameters however, I want 30 trials at random to show up in my experiment not 40. How do i do this?

He easiest way offline is to add a code component in your loop (e.g. called trials) with the following code.

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

If you want it to work online then you currently have to change trials to snapshot on the JavaScript side only.

Thankyou! I’ve tried this but it has not seemed to work . I kept getting this error “nameError: name ‘trial’ is not defined” so I deleted the code component.

What is the name of your loop?