Group: Forum Members
Posts: 7,
Visits: 59
|
Hi,
I am trying to randomly select the horizontal position on the screen for 4 pictures (target, foil1, lure, foil2). I have predefined 4 positions and want each picture to be in one unique position (so that no two pictures are on the same spot) on every trial. I am using the counter element to select one location for each picture, and it is working on most trials, such that each picture is in its own position with no overlap, but on some trials two of the pictures will be on the exact same horizontal position.
I have pasted some of my code below, and I really appreciate any advice on solving this!
Thanks, Elizabeth
<counter location1> /items = (13%, 38%, 63%, 88%) /not = (location2, location3, location4) /select = noreplace /selectionrate = always </counter>
<counter location2> /items = (13%, 38%, 63%, 88%) /not = (location1, location3, location4) /select = noreplace /selectionrate = always </counter>
<counter location3> /items = (13%, 38%, 63%, 88%) /not = (location1, location2, location4) /select = noreplace /selectionrate = always </counter>
<counter location4> /items = (13%, 38%, 63%, 88%) /not = (location1, location2, location3) /select = noreplace /selectionrate = always </counter>
<picture target> /items = target /vposition = 70% /hposition = counter.location1.selectedvalue /size = (20%,20%) /select = sequence </picture>
<picture foil1> /items = foil1 /vposition = 70% /hposition = counter.location2.selectedvalue /size = (20%,20%) /select = sequence </picture>
<picture lure> /items = lure /vposition = 70% /hposition = counter.location3.selectedvalue /size = (20%,20%) /select = sequence </picture>
<picture foil2> /items = foil2 /vposition = 70% /hposition = counter.location4.selectedvalue /size = (20%,20%) /select = sequence </picture>
<trial item> /stimulustimes = [1 = fixation; 500 = clearscreen, test, target, foil1, lure, foil2, f, g, h, j] /validresponse = ("f","g","h","j") /ontrialend = [reset(counter.location1, counter.location2, counter.location3, counter.location4)] </trial>
|