Hello,
I am looking for some help with coding my experiment.
Part 1 (highlighting stimuli)
On the screen I have 6 stimuli presented. When a stimulus is selected (using the keys: 1,2,3,4,5,6) I want to have a border appear highlighting the selected stimulus. I have added a polygon component to the builder, and I have specified 0 for contrast, opacity and line width. In my code component I have tried writing : for when stimulus 1 is selected, the parameters of the polygon are changed to the different values. I am not seeing a change in the values from 0 when I select “1” during the trial.
Part 2 (correcting selection of stimuli)
I am unsure as of how to approach this section. As stated before, a response is given by pressing the keys (1,2,3,4,5,6). Currently in my experiment: for the first portion of the experiment, only 1 response is given and the trial automatically ends. For the second portion of the experiment, 3 responses are given, and when the third response if given, the trial automatically ends.
I think I need to somehow introduce the code where: when the key “backspace” is pressed, remove the last given answer. I also would need to somehow change the end routine, because right now the trial ends when the length of my keyboard component is either 1 (for the first part of the experiment) or 3 (for the second part of the experiment). I think introducing a separate key such as “space”, for when the participant hits space, the trials ends, but at the same time I would need to control that all possible answers (either 1 answer, or 3 answers) are selected before ending the trial.
Here is what the code looks like now: