I’m trying to program an experiment where people need to move the mouse from one side of the screen to another. I’m stuck with a very simple problem. I need participants to do quick mouse movements from the left side of the screen (-.7,0) to the center of the screen (0,0) in less than 3 seconds. If they take more than 3 seconds, they have to repeat the trial. I’ve managed to get everything to work, except that I would like the 3 seconds to start counting only once participants start moving the mouse. With my code now, the 3 seconds start even if participants haven’t moved the mouse (so if I wait for 3 secs, and then start moving the mouse, the trial is repeated right away)
checkstart=True; if checkstart == True: if -.69 <= x <= 0 and t > 3: #if mouse starts moving on x axis t > 3: #if time is more than 3 secs buzzer.play() #buzzer plays key_resp.corr = 3 #trial is repeated continueRoutine=False
Any help would be highly appreciated!