Group: Administrators
Posts: 13K,
Visits: 104K
|
Store positions etc. in global variables (<values> entries), reference those as needed:
<values> / s1h = 0 / s1v = 0 / s1onset = 0 / s1duration = 0 / s2h = 0 / s2v = 0 / s2onset = 0 / s2duration = 0 </values>
<list onsets> / items = (2000,2500,3000,3500,4000,4500) / selectionrate = always </list>
<list duration> / items = (100,200,300,400,500,600) / selectionrate = always </list>
<list h> / items = (20%, 40%, 60%, 80%) / selectionrate = always </list>
<list v> / items = (20%, 30%, 40%, 50%, 60%, 70%, 80%) / selectionrate = always </list>
<block someblock> / trials = [1-10=sometrial] </block>
<trial sometrial> / ontrialbegin = [values.s1h=list.h.nextvalue; values.s1v=list.v.nextvalue; values.s1onset=list.onsets.nextvalue; values.s1duration=list.duration.nextvalue;
values.s2h=list.h.nextvalue; values.s2v=list.v.nextvalue; values.s2onset=list.onsets.nextvalue; values.s2duration=list.duration.nextvalue; ] / ontrialbegin = [trial.sometrial.insertstimulustime(shape.s1, values.s1onset); trial.sometrial.insertstimulustime(shape.e1, values.s1onset+values.s1duration);
trial.sometrial.insertstimulustime(shape.s2, values.s2onset); trial.sometrial.insertstimulustime(shape.e2, values.s2onset+values.s2duration); ]
/ ontrialend = [trial.sometrial.resetstimulusframes(); list.h.reset(); list.v.reset(); list.duration.reset(); list.onsets.reset(); ]
/ stimulusframes = [1=info] / validresponse = (57)
</trial>
<shape s1> / shape = rectangle / color = red / size = (100px, 100px) / hposition = values.s1h / vposition = values.s1v </shape>
<shape e1> / shape = rectangle / color = white / size = (100px, 100px) / hposition = values.s1h / vposition = values.s1v </shape>
<shape s2> / shape = circle / color = green / size = (100px, 100px) / hposition = values.s2h / vposition = values.s2v </shape>
<shape e2> / shape = circle / color = white / size = (100px, 100px) / hposition = values.s2h / vposition = values.s2v </shape>
<text info> / items = ("S1: Onset = <%values.s1onset%> | Duration = <%values.s1duration%> | X = <%values.s1h%> | Y = <%values.s1v%> ~nS2: Onset = <%values.s2onset%> | Duration = <%values.s2duration%> | X = <%values.s2h%> | Y = <%values.s2v%>") / position = (50%, 5%) / erase = false / size = (90%, 5%) </text>
|