| Reference | Downloads | Github

How to make 3 different rules in the same bigger loop?

I have 3 tasks required participants to press ‘f’, or ‘j’ according to different rules.
taskA: the number is red ,if the number is even,press ‘f’ ; else ‘j’.
task B:the number is green ,if the number is smaller than 5,press ‘f’; else ‘j’;
task C: the numer is white ,if the number is one of 1,3,7,8,press ‘f’,else ‘j’
so the participants response correctly according to the color cues.
Here is the routine:

And the ‘rule’ part is to tell the subjects the following cue and the rule ,so the ‘Numloop’ just need to repeat 3 times.And code I put like this,but I don’t know how to write next

The cond.xlsx:

TSP.psyexp (19.9 KB) TSPcond.xlsx (8.8 KB)

All help is much appreciated!

Hi @Melody, would you mind explaining in more detail what you are trying to achieve, so we can help?

Thanks for asking! I 've find some way out .Seting the Numloop’s selected rows is the key step,and use code to write different rules.