|
Group: Administrators
Posts: 13K,
Visits: 109K
|
I'm not sure why you would want or need correctstreak here Also,
trial.mytrial.correctstreak
doesn't seem to make any sense as there is no <trial> element called "mytrial" in your code. Finally, you are not using the proper operators in your /branch conditions. '=' is the *assignment* operator, what you need, however, is the *logical* operator '=='.
Simply have the trial /branch according to either the trial's response or correct property. Here's an example using <text> elements instead of <video> (it works the same when using <video> stimuli):
<text repeat_question> / items = ("Press L to repeat the video. Press A to move on.") </text>
<text question_about_video> / items = ("Imagine question about the video here...") </text>
<values> / kein_tor_item = 1 / tor_item = 1 </values>
<text Videos_kein_Tor> / items = ("Kein Tor 1", "Kein Tor 2", "Kein Tor 3", "Kein Tor 4") / select = values.kein_tor_item </text>
<list kein_tor> / poolsize = 4 </list>
<text Videos_Tor> / items = ("Tor 1", "Tor 2", "Tor 3", "Tor 4") / select = values.tor_item </text>
<list tor> / poolsize = 4 </list>
<trial playvideo_kein_Tor> / ontrialbegin = [if (trial.repeat_kein_tor.response!=38) values.kein_tor_item=list.kein_tor.nextindex] / stimulustimes = [0=Videos_kein_Tor] / timeout = 1000 / validresponse = (noresponse) / branch = [if(script.currentblock=="experimentblock_mit_wiederholung")trial.repeat_kein_Tor else trial.showquestionaboutmyvideo] </trial>
<trial repeat_kein_Tor> / stimulusframes = [1=repeat_question] / validresponse = (30,38) / branch = [if(trial.repeat_kein_tor.response==30) trial.showquestionaboutmyvideo else trial.playvideo_kein_tor] </trial>
<trial playvideo_Tor> / ontrialbegin = [if (trial.repeat_tor.response!=38) values.tor_item=list.tor.nextindex] / stimulustimes = [0=Videos_Tor] / timeout = 1000 / validresponse = (noresponse) / branch = [if(script.currentblock=="experimentblock_mit_wiederholung")trial.repeat_Tor else trial.showquestionaboutmyvideo] </trial>
<trial repeat_Tor> / stimulusframes = [1=repeat_question] / validresponse = (30,38) / branch = [if(trial.repeat_tor.response==30) trial.showquestionaboutmyvideo else trial.playvideo_tor] </trial>
<trial showquestionaboutmyvideo> / stimulustimes = [0=question_about_video] / validresponse = ("a", "l") / correctresponse = ("a", "l") </trial>
<block experimentblock_ohne_wiederholung> / trials = [1-8=noreplace(playvideo_kein_Tor, playvideo_Tor)] </block>
<block experimentblock_mit_wiederholung> / trials = [1-8=noreplace(playvideo_kein_Tor, playvideo_Tor)] </block>
<expt> /blocks=[1=experimentblock_ohne_wiederholung; 2=experimentblock_mit_wiederholung; ] </expt>
|