If this template helps then use it. If not then just delete and start from scratch.
OS (Mac OS Sierra):
PsychoPy version (e.g. 1.84.x):
**Standard Standalone? (y)
What are you trying to achieve?:
The experiment I’m trying to build involves showing 2 stimuli to the participant. This stimuli can appear can appear at 4 positions of the screen (i.e. top, bottom, left, right). The name of the keyboard component is “response” and the allowed keypress is the up, down, left, right arrows. I have already done this bit and it is running fine.
The one that I want to do next is when the participant chooses the correct answer, I want a “green border” surrounding the correct choice and a “red border” for the incorrect choice as feedback.
What did you try to make it work?:
I placed an image of a green box and red box at the 4 possible positions and set the opacity to 0. I then wrote this into the code component in the “each frame” tab
if response.corr: green_top.opacity=1.0 green_bottom.opacity=1.0 green_left.opacity=1.0 green_right.opacity=1.0 else: red_top.opacity=0 red_bottom.opacity=0 red_left.opacity=0 red_right.opacity=0
What specifically went wrong when you tried that?:
When I tried running the experiment, regardless of whether the answer is correct or not, none of the borders appeared.
Any help is appreciated.