psychopy.org | Reference | Downloads | Github

Display image opens contingent on a response in lexical decision task?

Hi all, I’m very new to this so I apologize if this is a silly question. I’m trying to build a lexical decision task in PsychoPy builder. The stimuli is a video (it is a sign language lexical decision task), and participants indicate ‘y’ for YES or ‘n’ for NO. I’ve gotten this far. I’ve built a loop that uses a conditions spreadsheet to pull up the video stimuli and stores the response (‘y’ or ‘n’) and contains the correct response.

Next, I’m hoping that when participants test the picture vocabulary of the participants, so when they indicate ‘y’, a photo array will be presented. There will be 4 photos, and participants then indicate which photo in the array matches the word seen. Does anyone know if that is possible?

In the loop I’ve tried to include an image stimuli that presents with a specific condition but I’m not sure how to code the condition. Is it possible to have an image array display after a specific keyboard stroke?

Thanks in advance!

Hi @fcooley, I think what you want to do is include another routine in your loop that presents the photos conditionally based on whether ‘y’ was pressed. So, add another routine to your loop with four image stim positioned as you want them, or centred in each quadrant of the window. Also add a code component, and add in the “Begin Routine” tab, you want to test whether or not the previous answer was a ‘y’ - try this, assuming your keyboard in the previous routine is called resp:

if 'y' != resp.keys:  # If the response was not a 'y'
    continueRoutine = False  # End the routine, and do not present the pics