URL of experiment: Pavlovia
My experiment involves letter stimuli flashing onscreen with one letter every 150ms. Participants need to click the screen once per trial whenever they choose. They’re later asked which letter was onscreen when they clicked the screen.
I’m struggling to correctly save the letter that was genuinely onscreen when the participant clicked.
Here’s my mouse component:
All the ‘clickable stimuli’ are separate image components (named: P, X, D, etc) in the same routine as the mouse component.
When I have it set to save mouse state ‘on click’, I get this in the output file:
A list of all the clickable stimuli.
When I set the mouse component to save mouse state ‘final’, no name is saved, the mouse.clicked_name the column is missing.
I tried putting this code into the each frame tab:
if mouse.getPressed()==1: clicked = mouse.clicked_name
And this in the end routine tab:
This didn’t work, I still got a long list containing the names of all of the clickable stimuli.
I then tried just putting just this in the end routine tab:
But that produced the same result.
I have a feeling that the clicked_name is saving, but it’s being overridden on each frame.
For clarity, these are all my current tabs on my code component:
How do I make this so that it saves only the stimuli onscreen when the participant makes a left mouse click?