Self-initiated breaks


Author
Message
jahughes81
jahughes81
Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)
Group: Forum Members
Posts: 7, Visits: 1

Hello,


I have a Go/No-Go task that I am adapting for an EEG study. I need to program self-initiated breaks for blinking throughout the experiment where the participant can press a button that will allow them to take a break to blink when they need to. During the blink break that is initiated by the subject, a screen with text would appear that tells them to blink and then press the appropriate key to resume the experiment.


So, when they are finished they need to be able to press that button again to start off the experiment in the same place where they left off. I know how I would do it if I wanted a break to occur after a certain number of trials, but I am not sure how to do this in the way I need as detailed above. Any suggestions would be most appreciated. 


--


Jessica


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K

#1: Decide on a key you want to use to initiate a break (cf. the ESC key which has scan code 1).


#2: Add the scancode as /validresponse to *all your <trial> elements.


#3: Add /branch=[if (trial.[insertnameoftrialelementhere].response==1) trial.breaktrial] to all those <trial> elements.


#4: Set up the <trial breaktrial> element as usual.


Example:


<block myblock>
/ trials = [1-100=noreplace(a,b)]
</block>

<trial a>
/ posttrialpause = 500
/ stimulusframes = [1=atext]
/ validresponse = (0,1,57)
/ correctresponse = (57)
/ timeout = 3000
/ branch = [if (trial.a.response==1) trial.breaktrial]
</trial>

<trial b>
/ posttrialpause = 500
/ stimulusframes = [1=btext]
/ validresponse = (0,1,57)
/ correctresponse = (0)
/ timeout = 3000
/ branch = [if (trial.b.response==1) trial.breaktrial]
</trial>

<trial breaktrial>
/ stimulusframes = [1=breaktext]
/ validresponse = (57)
</trial>

<text atext>
/ items = ("A")
</text>

<text btext>
/ items = ("B")
</text>

<text breaktext>
/ items = ("Break")
</text>


jahughes81
jahughes81
Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)
Group: Forum Members
Posts: 7, Visits: 1

Thank you so much for your help, Dave! I'll give this a try today.


jahughes81
jahughes81
Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)
Group: Forum Members
Posts: 7, Visits: 1

Hi Dave,


I tried your suggestions and it worked. I want to make the break trial available only during the fixation cross because having it happen during an experimental trial makes it difficult to accurately respond on that trial due to timing constraints. 


I tried setting the trial break up for the fixation only, but pressing escape does not work like it did when I had the trial break set up to be available during all the experimental trials. I am not sure what I am doing wrong. My code is below:



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Cued Go / No-Go Task (Fillmore et al., 2006)


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************



   This script implements the Cued Go / No-Go Task



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Script Version:      1.0 (Final)


   Last Modified:      08-08-2012 at 04:46 PM (GMT+1)


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Valuesq


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Configurable values for


   - responsetimeout and


   - ITI (Inter-Trial-Interval)


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<values userparams>


/ responsetimeout = 250


/ iti = 400


/ feedback_time = 500


</values>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   The below values should not be changed.


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<values taskparams>


/ soa = 0


/ cuetype = 0


/ targettype = 0


/ nogo_targettype = 0


/ go_correctresp = 0


/ nogo_correctresp = 0


/ trialcount = 0


/ total = 0


/ rwd = 10


</values>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Task Instructions


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<instruct>


/ windowsize = (80%,80%)


/ inputdevice = keyboard


/ prevkey = (25)


/ nextkey = (57)


/ prevlabel = "Press P to go back"


/ nextlabel = "Press the spacebar"


/ finishlabel = "Press the spacebar"


</instruct>



<page intro>


^^Welcome to the Go / No-Go Task!


^^Put the index finger of your preferred hand on the spacebar. On each trial, a rectangle will appear on the screen.


^The rectangle will either be green or blue.


^^Press the spacebar as quickly as possible whenever you see the green rectangle.


^^If the rectangle is blue, do not respond at all.


^Try to respond as quickly as possible while making as few errors as possible.


^^There will be several practice blocks in the beginning. The task will take about 60 minutes to complete.


^^Press the spacebar to begin.


</page>




<page gainBlockInstr>


^^ WIN BLOCK!


</page>



<page lossBlockInstr>


^^ LOSE BLOCK!


</page>




<page begin>


^^This concludes the Practice for the Go / No-Go Task.


^^Get ready for the actual experiment and press the spacebar when you are ready to begin.


</page>




<page end>


^^This concludes the Go / No-Go Task.


^^Thank you for participating!


</page>


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Custom Data Output


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<data>


/ columns = [date,time,subject,blocknum,blockcode,values.trialcount,trialcode,response,latency,correct,error,


   picture.cue.currentitem,values.total,picture.target.currentitem,values.cuetype,values.targettype,values.nogo_targettype,values.soa]


/ separatefiles = true


</data>


***********************


Feedback


***********************


<text wrong>


/ items = wrong


/ color = (255, 0, 0)


/ fontstyle = ("Garamond", 36pt, true, false, false, false, 5, 0)


/ position =(50,70)


</text>



<item wrong>


/1 ="-10 Points"                 


</item>



<text right>


/ items = right


/ color = (0, 255, 64)


/ fontstyle = ("Garamond", 36pt, true, false, false, false, 5, 0)


/ position =(50,70)


</text>



<item right>


/1 = "+ 10 Points"


</item>



<text total>  


/ items = total


/ position = (50, 70)


/ txcolor = (0, 0, 0)


</text>



<text begin>


/ items = begin


/ position = (50, 50)


/ txcolor = (245, 245, 245)


/ fontstyle = ("Garamond", 36pt, true, false, false, false, 5, 0)


</text>



<item begin>


/1 = "This concludes the Practice for the Go / No-Go Task.


Get ready for the actual experiment and press the spacebar twice when you are ready to begin."


</item> 




<item total>


/1 = "Total = 200"


</item>



**************************************************************************************************************************************************************************


Block randomization


**************************************************************************************************************************************************************************



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Experiment Elements


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<expt>


/ preinstructions = (intro)


/ postinstructions = (end)


/ blocks = [1-4=noreplace(practice_gainBlock, practice_nogo_gainBlock, practice_lossBlock, practice_nogo_lossBlock);


         5=practice_end;6-8=noreplace(gainBlock, nogo_gainBlock, lossBlock, nogo_lossBlock)]


</expt>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Block Elements


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<block practice_end>


/preinstructions = (begin)


/trials = [1=sequence(practice_end)]


/ onblockbegin = [text.begin.item.1="This concludes the Practice for the Go / No-Go Task.


Get ready for the actual experiment and press the spacebar when you are ready to begin."]


</block>



<block practice_gainBlock>


/ preinstructions = (gainBlockInstr)


/ bgstim = (total)


/ trials = [1-24=sequence(cue, practice_gain_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1="+ 10 Points"; text.wrong.item.1=" 0 Points" ]


/ branch = [if (values.total < 0) block.practice_gainblock]


</block>



<block practice_nogo_gainBlock>


/ preinstructions = (gainBlockInstr)


/ bgstim = (total)


/ trials = [1-24=sequence(cue, practice_nogo_gain_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1="+ 10 Points"; text.wrong.item.1=" 0 Points" ]


/ branch = [if (values.total < 0) block.practice_nogo_gainblock]


</block>



<block practice_lossBlock>


/ preinstructions = (lossBlockInstr)


/ trials = [1-24=sequence(cue, practice_loss_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1=" 0 Points"; text.wrong.item.1="- 10 Points" ]


/ branch = [if (values.total <= -200) block.practice_lossblock]


</block>



<block practice_nogo_lossBlock>


/ preinstructions = (lossBlockInstr)


/ trials = [1-24=sequence(cue, practice_nogo_loss_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1=" 0 Points"; text.wrong.item.1="- 10 Points" ]


/ branch = [if (values.total < -200) block.practice_nogo_lossblock]


</block>




<block gainBlock>


/ preinstructions = (gainBlockInstr)


/ bgstim = (total)


/ trials = [1-144=sequence(cue, gain_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1="+ 10 Points"; text.wrong.item.1=" 0 Points" ]


/ branch = [if (values.total < 0) block.gainblock]


</block>



<block nogo_gainBlock>


/ preinstructions = (gainBlockInstr)


/ bgstim = (total)


/ trials = [1-144=sequence(cue,nogo_gain_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1="+ 10 Points"; text.wrong.item.1=" 0 Points" ]


/ branch = [if (values.total < 0) block.nogo_gainblock]


</block>



<block lossBlock>


/ preinstructions = (lossBlockInstr)


/ trials = [1-144=sequence(cue,loss_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1=" 0 Points"; text.wrong.item.1="- 10 Points" ]


/ branch = [if (values.total <= -1400) block.lossblock]


</block>



<block nogo_lossBlock>


/ preinstructions = (lossBlockInstr)


/ trials = [1-144=sequence(cue,nogo_loss_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1=" 0 Points"; text.wrong.item.1="- 10 Points" ]


/ branch = [if (values.total <-1400) block.nogo_lossblock]


</block>




**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Counters  ##Changes were made to the factorial design)


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Note: Factorial design with


   3 x SOA (300,400,500)


   2 x Cue (1=green,2=blue)


   2 x Trial Type (Go, No-Go)


   2 x Block (Gain, Loss)


   


   Blue cue go / no-go ratio is 4:1 (80% go trials, 20% no-go trials)


   Green cue go / no-go ratio is 1:4 (20% go trials, 80% no-go trials)



   Minimum number of trials required to fulfill the above conditions is 50.


   Task runs 250 trials, i.e., each factor combination is repeated 5 times. ####This has to be changed


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   SOAs in ms  ##Changes made were to reduce SOA from 5 to 3 different ones and I reduced the lines 


   from 25 to 24 so they would be counterbalanced.###


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<list soa>


/ items = (


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400)


</list>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Cues (1=vertical cue, 2=horizontal cue)   ###Changed lines from 25 to 24 for counterbalancing##


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<list cuetype>


/ items = (


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2)


/ selectionmode = list.soa.currentindex


</list>



*************************************************************************************************************************************************************************




**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Targets (1=horizontal go, 2=horizontal no-go)  ## Changes made were to reduce lines from 25 to 24 for consistentcy###


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<list targettype>


/ items = (


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2)


/ selectionmode = list.soa.currentindex


</list>


<list nogo_targettype>


/ items = (


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1)


/ selectionmode = list.soa.currentindex


</list>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Correct Responses (57=spacebar on go trials, 0=no response on no-go trials)



   ####Changes were made by reducing lines from 25 to 24###


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<list go_correctresp>


/ items = (


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0)


/ selectionmode = list.soa.currentindex


</list>



<list nogo_correctresp>


/ items = (


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57)


/ selectionmode = list.soa.currentindex


</list>




**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Trial Elements


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<trial practice_end>


/ stimulustimes = [0=blankscreen; 300=fixation; 600=blankscreen]


/ validresponse = (57)


/ timeout = inf


/ recorddata = false


</trial>



<trial cue>


/ ontrialbegin = [values.soa=list.soa.nextvalue; values.cuetype=list.cuetype.nextvalue;


   values.targettype=list.targettype.nextvalue; values.nogo_targettype=list.nogo_targettype.nextvalue; values.go_correctresp=list.go_correctresp.nextvalue; values.nogo_correctresp=list.nogo_correctresp.nextvalue;


   values.trialcount+=1]


/ stimulustimes = [0=blankscreen; 300=fixation; 600=blankscreen]


/ validresponse = (noresponse)


/ trialduration = 100 + values.soa


/ recorddata = false


</trial>



<trial practice_gain_target>


/ stimulustimes = [0=target]


/ validresponse = (1, 57, noresponse)


/ ontrialend = [if (trial.practice_gain_target.response==values.go_correctresp)


                        


                        values.total += 10}


               else (trial.practice_gain_target.response!=values.go_correctresp)


                        


                        values.total += 0}]


/ iscorrectresponse = [trial.practice_gain_target.response==values.go_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial practice_nogo_gain_target>  


/ stimulustimes = [0=nogo_target]


/ validresponse = (1, 57, noresponse)


/ ontrialend = [if (trial.practice_nogo_gain_target.response==values.go_correctresp)


                        


                        values.total += 10}


               else (trial.practice_nogo_gain_target.response!=values.go_correctresp)


                        


                        values.total += 0}]


/ iscorrectresponse = [trial.practice_nogo_gain_target.response==values.nogo_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial practice_loss_target>


/ stimulustimes = [0=target]


/ validresponse = (1, 57, noresponse)


/ ontrialend = [if (trial.practice_loss_target.response==values.go_correctresp)


                        


                        values.total += 10}


               else (trial.practice_loss_target.response!=values.go_correctresp)


                        


                        values.total += 0}]


/ iscorrectresponse = [trial.practice_loss_target.response==values.go_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial practice_nogo_loss_target>


/ stimulustimes = [0=nogo_target]


/ validresponse = (1, 57, noresponse)


/ ontrialend = [if (trial.practice_nogo_loss_target.response==values.go_correctresp)


                        


                        values.total += 10}


               else (trial.practice_nogo__target.response!=values.go_correctresp)


                        


                        values.total += 0}]


/ iscorrectresponse = [trial.practice_nogo_loss_target.response==values.nogo_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>




<trial gain_target>


/ stimulustimes = [0=target]


/ validresponse = (57, noresponse)


/ ontrialend = [if (trial.gain_target.response==values.go_correctresp)


                        


                        values.total += 10}


               else (trial.gain_target.response!=values.go_correctresp)


                        


                        values.total += 0}]


/ iscorrectresponse = [trial.gain_target.response==values.go_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial nogo_gain_target>


/ stimulustimes = [0=nogo_target]


/ validresponse = (57, noresponse)


/ ontrialend = [if (trial.nogo_gain_target.response==values.nogo_correctresp)


                        


                        values.total += 10}


               else (trial.nogo_gain_target.response!=values.nogo_correctresp)


                        


                        values.total += 0}]


/ iscorrectresponse = [trial.nogo_gain_target.response==values.nogo_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial loss_target>


/ stimulustimes = [0=target]


/ validresponse = (57, noresponse)


/ ontrialend = [if (trial.loss_target.response==values.go_correctresp)


                        


                        values.total += 0}


               else (trial.loss_target.response!=values.go_correctresp)


                        


                        values.total -= 10}]


/ iscorrectresponse = [trial.loss_target.response==values.go_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial nogo_loss_target>


/ stimulustimes = [0=nogo_target]


/ validresponse = (57, noresponse)


/ ontrialend = [if (trial.nogo_loss_target.response==values.nogo_correctresp)


                        


                        values.total += 0}


               else (trial.nogo_loss_target.response!=values.nogo_correctresp)


                        


                        values.total -= 10}]


/ iscorrectresponse = [trial.nogo_loss_target.response==values.nogo_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial fixation>


/ stimulustimes = [0=fixation]


/ validresponse = (1, noresponse)


/ trialduration = 500


/ branch = [if (trial.fixation.response==1) trial.breaktrial]  


/ recorddata = true


</trial>



<trial iti>


/ stimulustimes = [0=blankscreen]


/ validresponse = (noresponse)


/ trialduration = values.iti


/ recorddata = false


</trial>



<trial breaktrial>


/ stimulusframes = [1=breaktext]


/ validresponse = (1)


</trial>



<text breaktext>


/ items = ("Take a blink break. Afterwards please wait several seconds before continuing. Press spacebar to continue")


</text>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Cue Stims  


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<picture cue>


/ items = cues


/ select = values.cuetype


/ size = (75mm,75mm)


/ position = (50%,50%)


/ erase = false


</picture>



<item cues>


/ 2 = "HCUE.bmp"


/ 1 = "HGO.bmp"


</item>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Target Stims


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<picture target>


/ items = targets


/ select = values.targettype


/ size = (75mm,75mm)


/ position = (50%,50%)


/ erase = false


</picture>



<picture nogo_target>


/ items = targets


/ select = values.nogo_targettype


/ size = (75mm,75mm)


/ position = (50%,50%)


/ erase = false


</picture>



<item targets>



/ 1 = "HGO.bmp"


/ 2 = "HNOGO.bmp"


</item>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Fixation  


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<text fixation>


/ items = ("+")


/ fontstyle = ("Verdana", 10.00%, true)


/ erase = false


</text>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Blank Screen


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<shape blankscreen>


/ shape = rectangle


/ color = (white)


/ erase = false


/ size = (100%, 100%)


/ position = (50%, 50%)


</shape>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Debug Stuff


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<text debug>



/ txbgcolor = (white)


/ erase = false


/ size = (75%,5%)


/ position = (50%,5%)


</text>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Default Settings


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<defaults>


/ canvassize = (100%, 100%)


/ canvasaspectratio = (4,3)


/ minimumversion = "4.0.0.0"


/ fontstyle = ("Verdana", 2.50%, true)


/ screencolor = (white)


</defaults>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   End Of File


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K

Umm, you do realize that

<trial fixation> is actually never used / run in that script, don't you? The element that displays the fixation cross etc. is <trial cue>.



jahughes81
jahughes81
Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)
Group: Forum Members
Posts: 7, Visits: 1

I have a trial called fixation that calls the fixation text:



<trial fixation>


/ stimulustimes = [0=fixation]


/ validresponse = (1, noresponse)


/ trialduration = 500


/ branch = [if (trial.fixation.response==1) trial.breaktrial]  


/ recorddata = true


</trial>



Then below in the code is the fixation specifics:



<text fixation>


/ items = ("+")


/ fontstyle = ("Verdana", 10.00%, true)


/ erase = false


</text>



So, you are saying that I should have the branch code in the trial cue?


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K

I have a trial called fixation that calls the fixation text:


Yes, but can you show me where that <trial> is ever executed? It isn't. Hence, why should code that never runs affect how the script behaves? You can simply delete those elements and the script will work just like before. Please try that for yourself.


So, you are saying that I should have the branch code in the trial cue?


Yes.


jahughes81
jahughes81
Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)Partner Member (756 reputation)
Group: Forum Members
Posts: 7, Visits: 1

Yes, I see that you are right. I did not explicitly call the fixation trial because it's nested within the cue trial. I tried adding the branch to the cue trial, but the escape key is not initiating the break screen:



<trial cue>


/ ontrialbegin = [values.soa=list.soa.nextvalue; values.cuetype=list.cuetype.nextvalue;


   values.targettype=list.targettype.nextvalue; values.nogo_targettype=list.nogo_targettype.nextvalue; values.go_correctresp=list.go_correctresp.nextvalue; values.nogo_correctresp=list.nogo_correctresp.nextvalue;


   values.trialcount+=1]


/ stimulustimes = [0=blankscreen; 300=fixation; 600=blankscreen]


/ validresponse = (1, noresponse)


/ branch = [if (trial.cue.response==1) trial.breaktrial]  


/ trialduration = 100 + values.soa


/ recorddata = true


</trial>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K

I did not explicitly call the fixation trial because it's nested within the cue trial


No, it is not. There is no way to nest trials within trials. This


/ stimulustimes = [0=blankscreen; 300=fixation; 600=blankscreen]


is a reference to a *stimulus* element (<text>, <picture>, etc.) and *not* a <trial> element.


I tried adding the branch to the cue trial, but the escape key is not initiating the break screen:


Please see the documentation for the /beginsresponsetime (formerly /responsetime) attribute.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search