This is the first time I am using PsychoPy for an experiment and I am trying to make a questionnaire that participants have to fill in:
I have made questions with multiple choice answers and I have put the multiple choice answers in polygons. I have done so because I want to test the participants on their knowledge of the instructions. I have made two routine screens where one of them holds 6 questions and the next 5 questions. I want participants to fill answers, where they can at the last moment check whether they had them right.
I have two problems:
I am able to let participant click on answers and unselect them: the colour changes to red when selected and to white when unselected. However, when clicked the selected polygons will flicker from red to white. I think it is the same problem as in this thread: Stimuli changes colour when clicked but 'flickering' and not responding immediately
I cannot seem to apply it to my experiment somehow, this is my code:
polygons = [rec_1_a, rec_1_b, rec_1_c, rec_2_a, rec_2_b, rec_3_a, rec_3_b, rec_4_a, rec_4_b, rec_4_c, rec_5_a, rec_5_b, rec_5_c, rec_6_a, rec_6_b] for i in polygons: if mouse.isPressedIn(i) and i.fillColor != "red": i.fillColor = "red" elif mouse.isPressedIn(i) and i.fillColor != "white": i.fillColor = "white"
My second problem:
I would like to say that if one of the answers in question 1 (rec_1_a, rec_1_b, rec_1_c) is selected, the others ones must be unselected, so you can only select one answer for a given question.
If somebody has any tips for me this would be much appreciated.