Thanks Dave!
I have now added my second block onto this script...but it doesn't run properly.
Could you suggest what I might have done wrong? (script below)
Thanks!
<values>
/ ncorrectinarow = 0
</values>
<trial happy1left>
/stimulustimes = [0=happy1left; 0=target2right; 0=correctsignal]
/timeout = 1000
/ validresponse = (noresponse)
/ ontrialend = [if (block.1.correct) values.ncorrectinarow +=1 else values.ncorrectinarow=0]
/ iscorrectresponse = [block.1.correct]
</trial>
<trial happy1right>
/stimulustimes = [0=happy1right; 0=target2left; 0=correctsignal]
/ ontrialend = [if (block.1.correct) values.ncorrectinarow +=1 else values.ncorrectinarow=0]
/timeout = 1000
/ validresponse = (noresponse)
/ iscorrectresponse = [block.1.correct]
</trial>
<trial angry2left>
/stimulustimes = [0=angry2left; 0=target1right; 0=correctsignal]
/timeout = 1000
/ validresponse = (noresponse)
/ ontrialend = [if (block.1.correct) values.ncorrectinarow +=1 else values.ncorrectinarow=0]
/ iscorrectresponse = [block.1.correct]
</trial>
<trial angry2right>
/stimulustimes = [0=angry2right; 0=target1left; 0=correctsignal]
/timeout = 1000
/ validresponse = (noresponse)
/ ontrialend = [if (block.1.correct) values.ncorrectinarow +=1 else values.ncorrectinarow=0]
/ iscorrectresponse = [block.1.correct]
</trial>
<trial target1corrleft>
/ validresponse = (lbuttondown, rbuttondown)
/correctresponse = (lbuttondown)
/inputdevice = mousekey
/pretrialpause =1000
/stimulustimes = [0=target1left; 0=target2right; 0=stimulussignal]
/ responsetrial = ("lbuttondown", happy1left)
/ responsetrial = ("rbuttondown", angry2right)
</trial>
<trial target1corrright>
/ validresponse = (lbuttondown, rbuttondown)
/inputdevice = mousekey
/pretrialpause =1000
/ correctresponse = (rbuttondown)
/stimulustimes = [0=target1right; 0=target2left; 0=stimulussignal]
/ responsetrial = ("lbuttondown", angry2left)
/ responsetrial = ("rbuttondown", happy1right)
</trial>
<trial happy2left>
/stimulustimes = [0=happy2left; 0=target1right; 0=correctsignal]
/timeout = 1000
/ validresponse = (noresponse)
/ ontrialend = [if (block.2.correct) values.ncorrectinarow +=1 else values.ncorrectinarow=0]
/ iscorrectresponse = [block.2.correct]
</trial>
<trial happy2right>
/stimulustimes = [0=happy2right; 0=target1left; 0=correctsignal]
/timeout = 1000
/ validresponse = (noresponse)
/ ontrialend = [if (block.2.correct) values.ncorrectinarow +=1 else values.ncorrectinarow=0]
/ iscorrectresponse = [block.2.correct]
</trial>
<trial angry1right>
/stimulustimes = [0=angry1right; 0=target2left; 0=correctsignal]
/ ontrialend = [if (block.2.correct) values.ncorrectinarow +=1 else values.ncorrectinarow=0]
/timeout = 1000
/ validresponse = (noresponse)
/ iscorrectresponse = [block.2.correct]
</trial>
<trial angry1left>
/stimulustimes = [0=angry1left; 0=target2right; 0=correctsignal]
/ ontrialend = [if (block.2.correct) values.ncorrectinarow +=1 else values.ncorrectinarow=0]
/timeout = 1000
/ validresponse = (noresponse)
/ iscorrectresponse = [block.2.correct]
</trial>
<trial target2corrleft>
/ validresponse = (lbuttondown, rbuttondown)
/correctresponse = (lbuttondown)
/inputdevice = mousekey
/pretrialpause =1000
/stimulustimes = [0=target2left; 0=target1right; 0=stimulussignal]
/ responsetrial = ("lbuttondown", happy2left)
/ responsetrial = ("rbuttondown", angry1right)
</trial>
<trial target2corrright>
/ validresponse = (lbuttondown, rbuttondown)
/correctresponse = (rbuttondown)
/inputdevice = mousekey
/pretrialpause =1000
/stimulustimes = [0=target2right; 0=target1left; 0=stimulussignal]
/ responsetrial = ("lbuttondown", angry1left)
/ responsetrial = ("rbuttondown", happy2right)
</trial>
<block 1>
/ trials = [1-30 = noreplace (target1corrleft, target1corrright)]
/ stop = [values.ncorrectinarow == 3]
</block>
<block 2>
/ trials = [1-30 = noreplace (target2corrleft, target2corrright)]
/ stop = [values.ncorrectinarow == 3]
</block>