psychopy.org | Reference | Downloads | Github

Modifying the OpenIAT to wait for correct response

OS (Win10):
PsychoPy version (2020 1.3):

Goal: Trying to modify the OpenIAT to only move to the next trial once the correct response has been given.

At present the OpenIAT moves to the next trial irrespective of whether the correct response was given.
I am trying to minimise the amount of code used to make the transfer to an online version simple.

What did you try to make it work?:
In the original version, the feedback mechanism was in a separate routine to the trial routine. I moved the feedback components into the trial routine and adapted the trial code to look as follows:

image

I also switched off the “force end of routine” element in the ‘key_resp’ component.

However, the trial always ends on the first key press, correct or otherwise. It has since dawned on me that the code is in the ‘end routine’ tab of the code and has left me wondering, what is causing the routine to end when all the components are set to indefinite and the force end of routine is off?

In my ‘begin routine’ code I have simply have:
if corr==0:
____msg=“oops”
else:
____msg="+"

Am I missing something fundamentally basic about the way psychopy works? I assumed it would simply stay in the trial loop until the keypress was considered correct?

Thanks, Justin.

If you have Force End Routine ticked, then the routine will end when any Allowed Key is pressed, so you could try setting Allowed Keys to CorrAns so that it only ends on a correct answer. This will mean other keypresses won’t be stored by this component, but you could add another component with Store set to all keys and no correct answer to pick these up.

Ah ok I’ll give that a try.