[Solved] Is there a way to code "if... otherwise" ?
I am currently doing a assignment where we have to design a grating adaptation experiment. It goes something like this:
Participant will see a grating (tilted at an angle), participant will press key "z" or "m" to indicate which direction it is tilted. After responding, there is a 0.5 second pause with a blank screen before the next grating is shown. But the grating will only be shown for 3 seconds, after which it will be taken down and the participant can only move to the next grating after responding.
Grating (3 seconds) -> if key is pressed within 3 seconds, proceed to 0.5s pause.
-> Otherwise, grating removed. Participant have to answer (no time limit). 0.5s pause occur after response
Currently, I am unsure of how to code the programme for the "if... otherwise..." condition. Is there a way to code "if participant respond to grating within 3 seconds, proceed to 0.5 blank screen. Otherwise, remove grating and wait for response"?
Not sure if my question makes any sense. I was really confused by the assignment instructions as well. But much thanks in advance