Group: Forum Members
Posts: 4,
Visits: 5
|
Dear all,
I would like to make a modification to the Point Subtraction Aggression Paradigm which script can be found on the Millisecond website.
I'd like to show an item on random draws of specified intervals (called stealinterval in the script). So that I can control that the item will be shown 9 times but the program randomly decides the intervals in which the item will be shown.
I now ask inquisit to randomly draw an interval (later multiplied by 1000 to make them seconds) from a list of items. I want no replacement. But when I run this script for 10 minutes I see in the output that the item has been shown 10 or 11 times. --> meaning that it either does do replacements of just starts over again when the list is finished.
Below you find the pieces of script.
Any help would be greatly appreciated!
Many thanks in advance,
Kim Lien
<list stealinterval> /items = (10,20,30,40,50,60,70,80,90) / selectionmode = random / replace = false </list>
<trial select>
/ontrialbegin = [if (values.negcolortime !=0 && script.elapsedtime < values.negcolortime) trial.select.insertstimulustime(text.points_red, 0)]
/ ontrialbegin = [if (values.poscolortime !=0 && script.elapsedtime > values.poscolortime) { values.poscolortime = 0}] / ontrialbegin = [if (values.negcolortime !=0 && script.elapsedtime > values.negcolortime) { values.negcolortime = 0}]
/ ontrialbegin = [if (values.protection == 0 && values.procovationtime == 0) values.procovationtime = script.elapsedtime + (list.stealinterval.nextvalue * 1000)]
/ ontrialbegin = [if (values.protection == 1 && script.elapsedtime >= values.protectiontime) { values.protection = 0; values.protectiontime = 0; values.procovationtime = script.elapsedtime + (list.stealinterval.nextvalue*1000)}]
/ ontrialbegin = [if (values.protection == 0 && script.elapsedtime >= values.procovationtime) { values.totalpoints -= values.provocationpoints; values.count_provocations += 1; values.negcolortime = script.elapsedtime + 1000; values.poscolortime = 0; values.procovationtime = script.elapsedtime + (list.stealinterval.nextvalue*1000); trial.select.insertstimulustime(text.points_red, 0)}]
/ stimulusframes = [1 = points, letterA, letterB, letterC, presscounter, presscounterdesc, pointcounter]
/ isvalidresponse = [trial.select.response == values.key1 || trial.select.response == values.key2 || trial.select.response == values.key3] / monkeyresponse = (values.key1, values.key2, values.key3) /timeout = (500) /ontrialend = [trial.select.resetstimulusframes()] /branch = [if (trial.select.response != values.key1 && trial.select.response != values.key2 && trial.select.response != values.key3) trial.select] / branch = [if (trial.select.response == values.key1) {text.letterA.textcolor = blue; text.letterB.textcolor = white; text.letterC.textcolor = white; values.total_A += 1; trial.optionA_start}] / branch = [if (trial.select.response == values.key2) {text.letterB.textcolor = blue; text.letterA.textcolor = white; text.letterC.textcolor = white;values.total_B += 1; trial.optionB_start}] / branch = [if (trial.select.response == values.key3) {text.letterC.textcolor = blue; text.letterA.textcolor = white; text.letterB.textcolor = white;values.total_C += 1; trial.optionC_start}]/recorddata = true </trial>
|