I am using Psychopy v1.85.2. I am creating a simple experiment where the participant makes a choice between two objects on the screen. They can press ‘1’ for the object on the left, or ‘2’ for the object on the right. After they have made their response, I want both objects to stay on screen, and for the chosen object to be circled. If no response is made within 4 seconds, I don’t want either object to be circled, and there will be another screen that says “No Response.” I have a polygon stimuli for the circle, and in the ‘Position [x,y] $’ input I have the variable ‘position’. I am trying to use this code block to implement this :
position: ; if response.keys= '1' : position= 0.5, 0 elif response.keys= '2' : position= -0.5, 0 else: position= 10, 10
I have tried putting the code block in Begin Routine, Each Frame, and End Routine, but when I try to run the experiment, I get this error message:
NameError: name 'position' is not defined
Any help would be greatly appreciated!