Hi Dave,
I tried implementing that code but have run into a problem. Each block is only selecting the first image in the list of images, not a random image. Then on the next block the same image is being selected. Do you know where I've gone wrong here?
Thanks,
Lewis
<values>
/itemnumber = 1
/intensity = "?"
</values>
<parameters>
/nr_totalpostrialblocks = 25
/nr_totalnegtrialblocks = 25
</parameters>
<list intensity>
/ items = (
"hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi", "hi"
"lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo", "lo" )
/ maxrunsize = 2
</list>
<list hi_itemnumbers>
/items (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50)
</list>
<list lo_itemnumbers>
/items (51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100)
</list>
<picture pos>
/ items = item.pos
/ select = values.itemnumber
/ size = (60%, 60%)
/ position = (50%, 50%)
</picture>
<item pos>
/1 = "HPAstronaut 1.jpg"
/2 = "HPBeach 1.jpg"
/3 = "HPBungee jumping 2.jpg"
/4 = "HPCat 5.jpg"
/5 = "HPCliff diver 1.jpg"
/6 = "HPCliff diver 3.jpg"
/7 = "HPCouple 4.jpg"
/8 = "HPDog 5.jpg"
/9 = "HPDog 6.jpg"
/10 = "HPDog 12.jpg" //continues till item 100
/100 = "LPBear 1.jpg"
</item>
<block pos>
/ onblockbegin = [
values.trialcount +=1;
values.countposblocks += 1;
values.intensity = list.intensity.nextvalue;
if (values.intensity == "hi") {
values.itemnumber = list.hi_itemnumbers.nextvalue;
} else {
values.itemnumber = list.lo_itemnumbers.nextvalue;
};
]
/ trials = [1= trial.regulationposone; 2= likert.Arousalposquestions; 3=trial.moinitoringchoice; 4=trial.regulationpostwo; 5= likert.Arousalposquestions]
/ branch = [
if (values.countposblocks < parameters.nr_totalpostrialblocks){ return block.pos}
else values.countposblocks = 0]
/ onblockend = [
values.strategychoice = 0;
values.trialimagepos = 0;
values.monitoringchoice = 0;
]
</block>
<trial regulationposone>
/ ontrialbegin = [
trial.regulationposone.resetstimulusframes();
values.fixationduration = round(rand(2100, 2900));
values.blankduration = round(rand(400, 800));
values.intialstrategy = round(rand(1, 2));
trial.regulationposone.insertstimulustime(clearscreen, values.fixationduration);
trial.regulationposone.insertstimulustime(text.initialstrategy, values.fixationduration);
trial.regulationposone.insertstimulustime(clearscreen, values.fixationduration + 2500);
trial.regulationposone.insertstimulustime(picture.pos, values.fixationduration + 2500 + values.blankduration);
trial.regulationposone.insertstimulustime(clearscreen, values.fixationduration + 2500 + values.blankduration + 3000);
]
/ stimulustimes = [0=fixation;]
/ timeout = values.fixationduration + 2500 + values.blankduration + 3000
</trial>
<trial regulationpostwo>
/ ontrialbegin = [
values.monitoringchoice = 0;
trial.regulationpostwo.resetstimulusframes();
values.blankduration = round(rand(400, 800));
trial.regulationpostwo.insertstimulustime(text.strategychoice, +0);
trial.regulationpostwo.insertstimulustime(clearscreen, + 2000);
trial.regulationpostwo.insertstimulustime(picture.pos, 2000 + values.blankduration);
trial.regulationpostwo.insertstimulustime(clearscreen, 2000 + values.blankduration + 3000);
]
/ stimulustimes = [0=strategychoice;]
/ timeout = 2000 + values.blankduration + 3000
</trial>