Group: Forum Members
Posts: 8,
Visits: 37
|
Hi all,
Sorry if this has been asked before!
I am trying to create a trial where participants are shown an image for EITHER 400 or 1600 milliseconds (and are then shown an error message depending on whether they correctly or incorrectly identified the trial as being longer or shorter than 850ms; this bit is irrelevant to my problem, just here for some context). However, the following code (which, as far as I can tell, should do exactly that; I have highlighted the relevant line) seems to show the stimulus for a value somewhere BETWEEN 400-1600ms, rather than either/or.
<trial practise_trial> /ontrialbegin = [values.fixduration = 400 + round(rand(0,1))*1200] /ontrialbegin = [trial.practise_trial.insertstimulustime(picture.mask, 200+values.fixduration);] /stimulustimes = [1=fixation_cross_text; 200=practise_picture] /validresponse = (31, 38) /ontrialend = [values.presponse = trial.practise_trial.response] /ontrialend = [if(values.fixduration <= 850) values.correctresponse = "31"] /ontrialend = [if(values.fixduration >=851) values.correctresponse = "38"] /ontrialend=[if(values.correctresponse == values.presponse) values.trialoutcome = 1] /ontrialend=[if(values.correctresponse != values.presponse) values.trialoutcome = 0] /pretrialpause = (400) /inputdevice= keyboard /recorddata= false / branch=[if(values.trialoutcome == 1) trial.correctfb] / branch=[if(values.trialoutcome == 0) trial.errorfb] </trial>
Can anyone help? Thanks in advance!
|