Group: Forum Members
Posts: 10,
Visits: 82
|
That does work. After some more testing, I've determined that trialcount does not reset when there following conditions are met (but it could be more general than that): 1) the same block element is repeated, e.g. [1-5=block1] 2) the trial for which trialcount does not reset is branched from another trial specified in the block I've modified your script to replicate the issue:
Note: if you change [1=begin] to [1=mytrial] or if you insert the block1,block2 sequence, trialcount will reset.
<expt> / blocks = [1-4=block1] </expt> / blocks = [1=sequence(block1,block2)]
<block block1> / trials = [1=begin] </block>
<block block2> / trials = [1=mytrial] </block>
<trial mytrial> / stimulusframes = [1=mytext] / validresponse = (57,28) / branch = [if(response!=28) trial.mytrial] </trial>
<trial begin> / stimulusframes = [1=mytext] / validresponse = (57) / branch = [trial.mytrial] </trial>
<text mytext> / items = ("<%trial.mytrial.trialcount%>") </text>
|