Group: Administrators
Posts: 13K,
Visits: 104K
|
Example based on the previous ones I gave you in another thread:
<values> / aclickcount = 0 / arequiredcount = 1 / ahpos = 0% / bhpos = 0% / asize = 40% </values>
<expt> / blocks = [1-4=choiceblock] </expt>
<block choiceblock> / onblockbegin = [if (block.choiceblock.totalcount > 0) values.arequiredcount = 2 * values.arequiredcount; ] / trials = [1-10=choice] </block>
<trial choice> / ontrialbegin = [if (values.aclickcount <= 0) {values.ahpos=list.indicehposition.nextvalue; values.bhpos=list.indicehposition.nextvalue; values.asize=40%}; ] / ontrialend = [if (trial.choice.response=="astim") {values.aclickcount+=1; values.asize=values.asize*0.5; }; ] / stimulusframes = [1=astim, bstim, debug] / validresponse = (astim, bstim) / inputdevice = mouse / branch = [if (trial.choice.response=="bstim") trial.b] / branch = [if (trial.choice.response=="astim" && values.aclickcount>=values.arequiredcount) trial.a else trial.choice] </trial>
<list indicehposition> / items = (25%, 75%) / selectionrate = always </list>
<trial a> / ontrialend = [values.aclickcount=0] / stimulusframes = [1=mytext, debug] / validresponse = (57) </trial>
<trial b> / ontrialend = [values.aclickcount=0] / stimulusframes = [1=mytext, debug] / validresponse = (57) </trial>
<text astim> / items = ("A") / txbgcolor = (blue) / vposition = 50% / hposition = values.ahpos / size = (values.asize, values.asize) </text>
<text bstim> / items = ("B") / txbgcolor = (green) / vposition = 50% / hposition = values.bhpos / size = (40%, 40%) </text>
<text mytext> / items = ("<%script.currenttrial%>") </text>
<text debug> / items = ("A clicks required: <%values.arequiredcount%> | A clicks made: <%values.aclickcount%>") / position = (50%, 10%) / erase = false </text>
|