OS (e.g. Win10): win10
PsychoPy version (e.g. 1.84.x): 2022.2.4
Standard Standalone? (y/n) If not then what?: y
Hello Discourse community,
**What are you trying to achieve?:
I am trying to build an experiment in which participants see a reference picture (Master picture) in the top center part of the screen and 2 possible response pictures (Attributional response and Relational response) in the lower half of the screen, on the left and right side. All three pictures are presented simultaneously. I would like that for each trial, Attributional response and Relational response switch places randomly.
Each Master picture goes strictly with the 2 response pictures that go along with it.
I have 6 groups of 3 pictures each (so in total 6 trials).
**What did you try to make it work?
I have managed to randomize the order of picture groups across trials (thanks to the loopType being set to random) but I am still at the stage where Attributional responses are always on the left, Relational responses are always on the right.
I have one image component imageMasterStim that has a fixed location.
And two other image components imageAttributionalResponse and imageRelationalResponse that need to randomly switch locations from left to right on each new trial.
I have this piece of code in the Begin Routine that allows me to read the left and right position coordinates from the Excel sheet, shuffle them and select the first item after shuffling as the current position.
In both image components, I have $positions
I am a bit stuck when it comes to the randomization part.
I feel like I need an if statement, saying something like
If on this trial the shuffled position is PositionLeft, show imageAttributionalResponse on the left and imageRelationalResponse on the right, if the shuffled position is PositionRight, show imageAttributionalResponse on the right and imageRelationalResponse on the left.
But I don’t know exactly how to write it…
I am sorry for asking such a basic and recurrent question, I have read several of the randomization tutorials and posts in the forum, watched the video tutorials, but somehow I am still stuck here. I would be grateful for any help and/or suggestions!
All the best,