I have created an experiment where users are required to click certain objects using the mouse. I created a grid of clickable stimuli and added them to the mouse component. In my conditions sheet, I made sure the corr_ans was the same as the correct clickable stimuli. I then used this code as recommended in another thread:
if stim_mouse.clicked_name == corr_ans: correct = 1 else: correct = 0 trials1.addData('correct', correct)
The code is in the End Routine tab.
I have found that no matter what is pressed, be that correct or incorrect, the “correct” column never shows anything other than a 0.