I use PsychoPy 2020.2.6 on Windows 10.
During the acquisition phase of a learning experiment, induction paradigm, I want that the effect words, which appear after the participant has pressed a certain key, keep their white colour (as it is now,) but that the “too slow!” - feedback, that appears if they take longer than 1000ms to respond, is shown in red colour.
My problem is that I have not set the effects, which appear after each key press, by using an .xlsx file, but I have set them in a code component as followed:
if (group is ‘category’ and condition is ‘congruent’ and input_phase.keys is ‘left’):
resp = ‘furniture’
elif (group is ‘category’ and condition is ‘congruent’ and input_phase.keys is ‘right’):
resp = ‘animal’
…
else:
resp = “too slow!”
Now, I cannot change only the “too slow” message into red colour.
What did you try to make it work?:
I tried various options using another code fragment, and none of it worked. The last one was this:
if resp is ‘furniture’ or ‘chair’ or ‘cat’ or ‘animal’ and effect_txt.color == “white”:
effect_txt.color = “white”
else:
effect_txt.color = ‘red’
What specifically went wrong when you tried that?:
What goes wrong in this case is that all effects are ahown in white again. Before, I also tried to outline all options that should be shown in white with an if…else function, but it happened the same. If I use the response latency in the if…else function, I get everything in red.
Does somebody maybe know how to change this? Or do I have to change my whole experiment using .xlsx files instead of the code components?
Thank you for any thought and answer on this!