Group: Forum Members
Posts: 19,
Visits: 69
|
Hi
I'm trying to create a Minimal Worked Example for an experiment which involves conditional branching to give feedback. Code is below. I can get the items to display, and I can record the keypresses, but the conditional branching doesn't work. The aim is to give 'correct' and 'incorrect' feedback according to a series of values specified in a lis (called 'answer'). The problem is that the conditional statements (in wordTrial) do not succeed in calling further trials to give the feedback. This is either a problem with the way items from the list are selected, or with the conditional statements themselves. It all looks perfectly okay to me.
Any feedback greatly welcomed
Nick
<text wordText> / items = ("dog", "cat") / select = sequence </text>
<text questionText> / items = ("Is this a dog?", "Is this a lizard?") / vposition = 25% / select = text.wordText.currentindex </text>
<text correctResponseText> / items = ("Correct!") </text>
<text incorrectResponseText> / items = ("Incorrect!") </text>
<list answer> / items = ("y", "n") / selectionmode = sequence </list>
<trial wordTrial> / stimulusframes = [1 = wordText, questionText] / validresponse = ("y", "n") / branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.correctResponse] / branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.incorrectResponse] </trial>
<trial correctResponse> / stimulusframes = [1 = correctResponseText] / timeout = 6000 </trial>
<trial incorrectResponse> / stimulusframes = [1 = incorrectResponseText] / timeout = 6000 </trial>
<block wordBlock> / trials = [1-2 = wordTrial] </block>
<expt exptBlock> / blocks = [1 = wordBlock] </expt>
|