+x+xA /branch must remain at the same level. I:e. a <block> can /branch to another <block>, it cannot /branch to a <trial>. A <trial> can /branch to another <trial>, it cannot /branch to a <block>.
Ok Hmmm... then here is what I tried:
<text test1> / items = ("test1") </text>
<text test2> / items = ("test2") </text>
<likert test1> / branch = [if (script.groupid == "2") likert.test2] / stimulusframes=[1=text.test1] /position = (50,75) </likert>
<likert test2> / stimulusframes=[1=text.test2] /position = (50,75) </likert>
<block test> / trials = [1=likert.test1] </block>
No matter what group ID I enter when I run the script, I get the test1 likert trial. Is there a better way to do this that I am not seeing?
You always get the likert.test1 trial because you run it in every case per your <block>:
<block test> / trials = [1=likert.test1] </block>
It is only _after_ likert.test1 that you /branch to likert.test2:
<likert test1> / branch = [if (script.groupid == "2") likert.test2] / stimulusframes=[1=text.test1] /position = (50,75) </likert>
There are tons of ways to do this correctly, some involving /branch, others not involving /branch, but rather /skip or just treating the whole thing as a between-subjects condition.
If you want to use /branch, either set up separate <block>s -- one running test1, one running test2 -- and /branch to the appropriate <block> from your existing block. You can also just use a single <block>, have it run a single dummy trial that does nothing but /branch to the appropriate <likert>. Or you can have your <block> run _both_ likerts and use /skip to exclude the one likert that's not supposed to be administered depending on groupid.
#1:
<text test1>
/ items = ("test1")
</text>
<text test2>
/ items = ("test2")
</text>
<likert test1>
/ stimulusframes=[1=text.test1]
/position = (50,75)
</likert>
<likert test2>
/ stimulusframes=[1=text.test2]
/position = (50,75)
</likert>
<block test>
/ branch = [if (script.groupid == "1") block.test1]
/ branch = [if (script.groupid == "2") block.test2]
</block>
<block test1>
/ trials = [1=likert.test1]
</block>
<block test2>
/ trials = [1=likert.test2]
</block>
<expt>
/ blocks = [1=test]
</expt>
#2:
<text test1>
/ items = ("test1")
</text>
<text test2>
/ items = ("test2")
</text>
<likert test1>
/ stimulusframes=[1=text.test1]
/position = (50,75)
</likert>
<likert test2>
/ stimulusframes=[1=text.test2]
/position = (50,75)
</likert>
<trial test>
/ validresponse = (0)
/ recorddata = false
/ trialduration = 0
/ branch = [if (script.groupid == 1) likert.test1]
/ branch = [if (script.groupid == 2) likert.test2]
</trial>
<block test>
/ trials = [1=test]
</block>
<expt>
/ blocks = [1=test]
</expt>
#3:
<text test1>
/ items = ("test1")
</text>
<text test2>
/ items = ("test2")
</text>
<likert test1>
/ skip = [script.groupid == 2]
/ stimulusframes=[1=text.test1]
/position = (50,75)
</likert>
<likert test2>
/ skip = [script.groupid == 1]
/ stimulusframes=[1=text.test2]
/position = (50,75)
</likert>
<block test>
/ trials = [1=sequence(test1, test2)]
</block>
<expt>
/ blocks = [1=test]
</expt>