If you’d have a solution for this in the Builder or the Coder, any solution is welcome.
I’ve done a code with one loop. In that loop, the subject needs to hit one correct button for the presented stimulus, but several are accepted. I want that the loop is repeated if either too many errors have been made (too many times the wrong key was hit) or if the subject took too much time to answer (judged to be longer than 800 ms after stimulus onset in my study). Check the attached code and run it once, and u’ll see two messages popping up in function of if and when you provide your answer, then you’ll know my evaluation criteria. Speaking in terms of the experiment, once the entire block is finished (ran through all stimuli once), one of two messages should show up, according to response evaluations made :
a) You hit the wrong button in more than 50% of the trials, which is why this loop will be repeated (and the loop will be relaunched from the beginning).
b) You hit the wrong button in less tan 50% of the trials, so you successfully completed this block (pass on to next block).
Same for response latency > 800 ms evaluation:
a) To more than 50% of the stimuli, you answered with a too slow reaction time, which is why this loop will be repeated (and the loop will be relaunched from the beginning).
b) You answered fast enough over all trials, so you successfully completed this block (pass on to next block).
Instant_Errormessage.py (9.8 KB)
Any help is heavily appreciated, thanks!