I am trying to randomise the location of 4 items on the screen (randomising both vposition and hposition), but have one item's location always dependent on the location of the other (e.g. I always want feature5 to appear in the same "column" as SharedA, but feature8 to always appear in the same "column" as RareA", but have all 4 positions change randomly, except for the latter contingency, so that the vposition and hposition of each pair swap between each "column" and hposition).
I can't quite get the code to work so any help would be much appreciated. Right now the pictures seem to be appearing on top of each other and I think it's because I'm re-using the values twice, but can't seem to get it to work any other way.
<block exampleblock>
/ trials = [1-10 = Atrials]
</block>
<values>
/ a_pos_h = 0%
/ wrong_pos_h = 0%
/ a_pos_v = 0%
/ wrong_pos_v = 0%
</values>
<counter colorcounter_h>
/ items = (1,2)
/ select = noreplace
/ selectionrate = always
</counter>
<counter positioncounter_h>
/ items = (40%,60%)
/ select = noreplace
/ selectionrate = always
</counter>
<counter colorcounter_v>
/ items = (1,2)
/ select = noreplace
/ selectionrate = always
</counter>
<counter positioncounter_v>
/ items = (30%,70%)
/ select = noreplace
/ selectionrate = always
</counter>
<trial Atrials>
/ ontrialbegin = [values.a_pos_h = counter.positioncounter_h.selectedvalue;
values.wrong_pos_h = counter.positioncounter_h.selectedvalue; values.a_pos_v = counter.positioncounter_v.selectedvalue;
values.wrong_pos_v = counter.positioncounter_v.selectedvalue;]
/ stimulusframes = [1=ListA,listA_partner,wronglistA,wronglistA_partner,keybindings1,keybindings2]
/ validresponse = (30, 38)
/ iscorrectresponse = [(values.a_pos_h==40% && trial.Atrials.response==30)
|| (values.a_pos_h==60% && trial.Atrials.response==38)]
</trial>
<picture ListA>
/ items = ListA
/ select = colorcounter_h
/ select = colorcounter_v
/ hposition = values.a_pos_h
/ vposition = values.a_pos_v
</picture>
<picture ListA_partner>
/ items = ListA_partner
/ select = current(ListA)
/ select = colorcounter_h
/ select = colorcounter_v
/ hposition = values.a_pos_h
/ vposition = values.a_pos_v
</picture>
<picture wronglistA>
/ items = wronglistA
/ select = colorcounter_h
/ select = colorcounter_v
/ hposition = values.wrong_pos_h
/ vposition = values.a_pos_v
</picture>
<picture wronglistA_partner>
/ items = wronglistA_partner
/ select = current(wrongListA_partner)
/ select = colorcounter_h
/ select = colorcounter_v
/ hposition = values.wrong_pos_h
/ vposition = values.a_pos_v
</picture>
<item ListA>
/ 1 = "SharedA.jpg"
/ 2 = "SharedA.jpg"
/ 3 = "SharedA.jpg"
/ 4 = "SharedA.jpg"
</item>
<item ListA_partner>
/ 1 = "feature5.png"
/ 2 = "feature5.png"
/ 3 = "feature5.png"
/ 4 = "feature5.png"
</item>
<item wronglistA>
/ 1 = "RareA.jpg"
/ 2 = "RareA.jpg"
/ 3 = "RareA.jpg"
/ 4 = "RareA.jpg"
</item>
<item wronglistA_partner>
/ 1 = "feature8.png"
/ 2 = "feature8.png"
/ 3 = "feature8.png"
/ 4 = "feature8.png"
</item>