PsychoPy version: 3.2.4
What are you trying to achieve?:
I have designed a cued switching task for children, where they had to sort some toys based on their color or shape. The outline of the experiment is as follows:
There will be four stimuli: Red Bear, Blue Bear, Red Car, and Blue Car.
If the cue is for color, participants have to select either blue or red color, whereas if the cue is for shape, they have to select either bear or car. So, there are four response options: A=Blue, S=Red, K=Bear, L=Car.
I have to take responses here using a touchscreen. And that’s where the problem is occurring. There are four response pictures from which the participant has to touch one as a response. Similarly, in all trials he has to do the same. I tried using the .contains() method.
I kept the following code:
for stimulus in stimuli:
if stimulus.contains(mouse) and stimulus.name == corrAns:
continueRoutine = False
Here, the stimulus does not appear when the trial runs. Also, in further trials, the target somehow does not appear.
I also want to know the reaction time of the click. What other modifications in the code can I do to have the name and reaction time of the clicked stimulus.
Thank you in advance