Hello Achilles,
ok, you have set the clip to play for 40 seconds (duration = 40). Well, the clip is 40 seconds long but it takes some time to load it and to scale it to size. So, you might want to scale it yourself to the desired size to reduce lag and change format. The mp4-file is about half the size of the mov-file. With the duration setting of 40 seconds, the clip ended prematurely. In addition, you defined two if-constructions to end the routine. This is not necessary.
You need to reset the values of beep.playing, beep.waiting, checker.drawing and checker.waiting at the end of the routine. Your if-constructions did not seem to work in each repetition.Simply add beep.waiting = False
aso. to the End Routine tab of the respective code-element.
Delete the code-part
# end the routine if the trial duration has been reached
if t > trialDuration:
checker.drawing = False
checker.waiting = False
continueRoutine = False
and
# end the routine if the trial duration has been reached
if t > trialDuration:
checker.drawing = False
checker.waiting = False
continueRoutine = False
The routine ends when the clip is finished and with the change to the End Routine tab, your variables are reset.
Best wishes Jens