Group: Forum Members
Posts: 25,
Visits: 208
|
Hi,
I have an experiment where participants have to choose which of three images they have seen before. Each image has a number underneath (1,2 and 3 - always in the same locations) they enter the number on the keyboard that corresponds to the number underneath the correct image - but the location of the images is random.
I've done this by setting the image positions with a counter - see below
<picture D> / items = ("D.png") / hposition = counter.poscounter.selectedvalue / vposition = 50 </picture>
<picture D2> / items = ("D2.png") / hposition = counter.poscounter.selectedvalue / vposition = 50 </picture>
<picture Dcorrect> / items = ("Dcorrect.png") / hposition = counter.poscounter.selectedvalue / vposition = 50 </picture>
<counter poscounter> / items = (25, 50, 75) / select = noreplace / selectionrate = always </counter>
So this means the correct response will vary on every trial depending on which location picture.Dcorrect is allocated to. I have tried to record the correct response based on location in an expression update in the trial. But I can't get this to work, the data records expressions.correctpos as 1 every time and always thinks the correct response is pressed even when it's not. The trial is below...
<trial doughnut> / ontrialbegin = [ values.category= "food" ] / ontrialbegin = [if (picture.Dcorrect.hposition= 25) expressions.correctpos = "1" else if(picture.Dcorrect.hposition= 50) expressions.correctpos = "2" else if(picture.Dcorrect.hposition= 75) expressions.correctpos = "3"] / stimulusframes = [1=D, D2, Dcorrect, no1, no2, no3] / validresponse = ("1", "2", "3") / iscorrectresponse = [expressions.correctpos] / ontrialend = [ if (trial.doughnut.correct) { values.foodcorrect +=1 } ] </trial>
- In addition two of the images seem to overlap sometimes - but not consistently?
Any help would be appreciated. I have attached a shortened version of the script too.
Thank you
Attachments
D.png
(258 views,
32.00 KB)
|