Mouse click feedback


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

Participants have to choose which shape is ‘correct’ from two on screen. After the mouse click, feedback should appear telling them if the choice was correct. After receiving correct feedback 6 times, a new trial begins and the stimuli change. Currently I can’t get the feedback code to work without stopping the presentation of the shapes. Thanks in advance if anyone has any ideas!

Begin experiment:

Begin routine:
if mouse_1.isPressedIn(star)
msg = ‘Correct’
msg = ‘Incorrect’

the feedback can be in the next routine where you re draw the shapes?

And make sure the feedback code is under the response component, otherwise you will have an empty message.

This makes more sense thanks! Only problem is now the above code always gives a syntax error I am not sure why?

Hello pylmbr

when you surround your code-examples with triple ` it is properly formatted in the forum and syntax errors can be spotted more easily. In the code above, a “:” is missing at the end of the first line.

Best wishes Jens