| Reference | Downloads | Github

Only displaying a certain number of conditions in a loop

If this template helps then use it. If not then just delete and start from scratch.

I have a conditions file of 1000 sentences, and I am trying to display only 50 at a time in a loop, and then show the instructions for the loop, and then continue displaying another 50 and so on until the 1000 sentences are displayed. However, when I try and change the number of sentences that are shown, they all still show up. I’m wondering if anyone has any suggestions. Thank you!!

You can set another loop around the instructions routine, with a variable as the number of repetitions (e.g. myRepInstructions). In the trial routine place a code component with something like this:

#in the begin experiment tab
myCounter = 0
myRepInstruction = 0

#in the begin routine tab
myCounter = myCounter + 1
if myCounter < 50:
    myRepInstruction = 0

#in the end routine tab
if myCounter = 50:
    myRepInstruction = 1
    myCounter = 0

with this, every 50 routines it should show the instructions