Hi all,
Currently designing an experiment in v2021.2.3.
I am trying to use a code component to change the color of two text elements depending on the stimulus image that is shown.
To be specific, I want the text elements to be white only if the image ‘stims/crosshair.png’ is on the screen, and to otherwise be gray to blend into the background.
$cc_stimulus is a column from an excel input spreadsheet that either points to different pleasant image filepaths OR ‘stims/crosshair.png’. This is the variable that I input to the “Image” section of my builder Image component:
My code so far for the conditional color change of the text components is as follows:
Where $cc_yescol and $cc_nocol are the variables that I put as the color of the text components.
There is no error message when I try to run the code–the text components just are not turning white when I want them to, when ‘stims/crosshair.png’ is on the screen. Is it a problem with my code in the Each Frame tab?
Thank you in advance for your help!