| Reference | Downloads | Github

Display a feedback below a stimulus until getting a correct response

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): PsychoPy1.85.2
Standard Standalone? (y/n) If not then what?:

What are you trying to achieve?:

I’m new to PsychoPy and I have a problem with giving feedback to participant’s responses.
I’m trying to display a feedback (a red ‘X’) below an image stimulus if a participant makes an error, and keep showing ‘X’ until a participant presses a correct key. After that next stimulus turns up.

What did you try to make it work?:
What specifically went wrong when you tried that?:

So far, I made a feedback ‘X’ to show after a image stimulus disappears, and it works correctly corresponding with correct and incorrect answers. Still, I have a problem with displaying feedback below the image stimulus until a participant presses a correct key. I’ve tried to move a code component of ‘Feedback1’ routine to ‘Part1’ and combined these two routines. However at this time, it didn’t work correctly that ‘X’ keeps showing regardless of responses. I would be really appreciate if anyone could help me.

I wrote a code component at ‘each frame’ like this:

if key_resp_8.keys:
if key_resp_8.keys[-1] != corrAns:
msg = ‘X’
key_resp_8.corr = True
continueRoutine = False

I attached my file(just part1 and 2) and Items in excel sheets are all image files.
AbledDiasbledTrain.xlsx (9.3 KB)
CongruentTrain.xlsx (9.3 KB)
IAT Part1&2.psyexp (57.2 KB)

One issue will be that you need to actively reset msg to be blank at the start of each trial.

i.e. in “begin routine”, put:

msg = ''

Otherwise, once it becomes 'X', it will stay that way indefinitely.

Now, it works correctly as I wanted!
Thank you so much Michael. You’re the best.:grin:

A post was split to a new topic: Display contingent feedback