I am trying to have some text on the screen over an image that is being displayed, but only under certain conditions–if the participant has not pressed any keys yet, and if they are on the first three loop iterations.
I have tried a code component that says this
if len(imageSwitcher_2.keys) != 0 or trials_3.thisN > 3:
text_13.opacity = 0
elif len(imageSwitcher_2.keys) == 0 and trials_3.thisN <= 3:
text_13.opacity = 1
imageSwitcher_2 is the keyboard component
trials_3 is the loop
text_13 is the text
I’ve also tried putting
trials_3.thisN <= 3 & len(imageSwitcher_2.keys) == 0
in the opacity field of the text component
Neither solution has worked.