It is, yes. Sorry but I am new at coding.
The user who created that code had in begin experiment a list of words that made up existWords. I don’t have a list of words, what I have there is:
response_alegria.text = "alegria"
response_raiva.text = "raiva"
response_tristeza.text = "tristeza"
response_medo.text = "medo"
response_nojo.text = "nojo"
response_surpresa.text = "surpresa"
The code he created run at each frame.
I just need some code that would allow me to write my output whether the participant clicked on the correct image or one of the incorrect ones.
I believe my entire code for this is the following:
# Initialize components for Routine "emocoes_video_response"
emocoes_video_responseClock = core.Clock()
emocoes_response = event.Mouse(win=win)
x, y = [None, None]
emocoes_response.mouseClock = core.Clock()
response_alegria = visual.ImageStim(
win=win,
name='response_alegria',
image='imagens/response_alegria.png', mask=None,
ori=0.0, pos=(-0.5, 0), size=(0.4, 0.4),
color=[1,1,1], colorSpace='rgb', opacity=None,
flipHoriz=False, flipVert=False,
texRes=128.0, interpolate=True, depth=-1.0)
response_raiva = visual.ImageStim(
win=win,
name='response_raiva',
image='imagens/response_raiva.png', mask=None,
ori=0.0, pos=(0, 0), size=(0.4, 0.4),
color=[1,1,1], colorSpace='rgb', opacity=None,
flipHoriz=False, flipVert=False,
texRes=128.0, interpolate=True, depth=-2.0)
response_tristeza = visual.ImageStim(
win=win,
name='response_tristeza',
image='imagens/response_tristeza.png', mask=None,
ori=0.0, pos=(0.5, 0), size=(0.4, 0.4),
color=[1,1,1], colorSpace='rgb', opacity=None,
flipHoriz=False, flipVert=False,
texRes=128.0, interpolate=True, depth=-3.0)
response_medo = visual.ImageStim(
win=win,
name='response_medo',
image='imagens/response_medo.png', mask=None,
ori=0.0, pos=(-0.5, -0.5), size=(0.4, 0.4),
color=[1,1,1], colorSpace='rgb', opacity=None,
flipHoriz=False, flipVert=False,
texRes=128.0, interpolate=True, depth=-4.0)
response_nojo = visual.ImageStim(
win=win,
name='response_nojo',
image='imagens/response_nojo.png', mask=None,
ori=0.0, pos=(0, -0.5), size=(0.4, 0.4),
color=[1,1,1], colorSpace='rgb', opacity=None,
flipHoriz=False, flipVert=False,
texRes=128.0, interpolate=True, depth=-5.0)
response_surpresa = visual.ImageStim(
win=win,
name='response_surpresa',
image='imagens/response_surpresa.png', mask=None,
ori=0.0, pos=(0.5, -0.5), size=(0.4, 0.4),
color=[1,1,1], colorSpace='rgb', opacity=None,
flipHoriz=False, flipVert=False,
texRes=128.0, interpolate=True, depth=-6.0)
response_alegria.text = "alegria"
response_raiva.text = "raiva"
response_tristeza.text = "tristeza"
response_medo.text = "medo"
response_nojo.text = "nojo"
response_surpresa.text = "surpresa"
emocoes_video_helper = visual.TextStim(win=win, name='emocoes_video_helper',
text='Selecione a emoção',
font='Arial',
pos=(0, 0.5), height=0.075, wrapWidth=None, ori=0.0,
color='white', colorSpace='rgb', opacity=None,
languageStyle='LTR',
depth=-8.0);
# Initialize components for Routine "instructions_end_3"
instructions_end_3Clock = core.Clock()
instrucoes_png_fim_6 = visual.ImageStim(
win=win,
name='instrucoes_png_fim_6',
image='instructions3/instructions3.009.png', mask=None,
ori=0.0, pos=(0, 0), size=(1, 1),
color='white', colorSpace='rgb', opacity=None,
flipHoriz=False, flipVert=False,
texRes=128.0, interpolate=True, depth=0.0)
end_key_6 = keyboard.Keyboard()
# Create some handy timers
globalClock = core.Clock() # to track the time since experiment started
routineTimer = core.CountdownTimer() # to track time remaining of each (non-slip) routine