Hello, everyone. I’m a beginner at Pavlovia and Psychopy.
Now I’m planning to make a task. In a certain routine of the task, I want to show two frames with two counterbalanced colors(yellow and blue) based on a randomized number.
I can activate my program in Local, in Pavlovia the frames are shown in Black.
Here is the error and the written code for JS(also the ideal frames from Local).
Actually, I looked at relevant questions here. But I do not understand what I should do.
Could you tell me how to make “color” in the code component?
flag = Math.floor(Math.random()*2)
↑ I made a randomized number and a variable.
if flag == 0:
polygon_2.lineColor= ‘yellow’
polygon_3.lineColor= ‘blue’
else:
polygon_2.lineColor= ‘blue’
polygon_3.lineColor= ‘yellow’
I want to show two frames such as the following screen.