Group: Forum Members
Posts: 4,
Visits: 28
|
Bonjour, Thanks for the reply, it was exactly what I wanted except that I was wandering how to get the decimals values of x and y rather than interger mode ? I do not know If I have to change the values function or the trial and how to do it.
<values> / x = 0px / y = 0px / mirrorx = 0.00 / mirrory = 0.00 / mousexpath = "" / mouseypath = "" / trialcount = 0 </values>
<expressions> / x = 1.00px*abs(values.x-(values.mirrorx*display.width)) / y = 1.00px*abs(values.y-(values.mirrory*display.height)) </expressions>
<trial start> / stimulusframes = [1=clickhere] / validresponse = (lbuttondown) / ontrialend = [values.x=trial.start.responsex; values.y=trial.start.responsey] / branch = [trial.record] / recorddata = false </trial>
<trial record> / ontrialbegin = [values.trialcount=values.trialcount+1] / stimulusframes = [1=dot, coordinates] / validresponse = (mousemove, lbuttondown, rbuttondown) / numframes = 1 / ontrialend = [values.x=trial.record.responsex; values.y=trial.record.responsey] / ontrialend = [values.mousexpath=concat(concat(values.mousexpath, values.x)," ")] / ontrialend = [values.mouseypath=concat(concat(values.mouseypath, values.y)," ")] / ontrialend = [insert(counter.x, values.x, values.trialcount)] / ontrialend = [insert(counter.y, values.y, values.trialcount)] / ontrialend = [insert(counter.duration, trial.record.latency, values.trialcount)] / branch = [if(trial.record.response=="lbuttondown")trial.end] / branch = [if(trial.record.response=="rbuttondown")trial.pause] / branch = [if(trial.record.response=="mousemove")trial.record] / recorddata = false </trial>
<trial pause> / stimulusframes = [1=coordinates] / validresponse = (mousemove, lbuttondown) / numframes = 1 / ontrialend = [values.x=trial.pause.responsex; values.y=trial.pause.responsey] / branch = [if(trial.pause.response=="lbuttondown")trial.record else trial.pause] / recorddata = false </trial>
<trial end> / stimulusframes = [1=blank, goodbye] / validresponse = (lbuttondown) / recorddata = true </trial>
<trial playback> / ontrialbegin = [values.x=counter.x.selectedvalue; values.y=counter.y.selectedvalue] / stimulusframes = [1=dot, coordinates] / validresponse = (noresponse) / numframes = 1 / trialduration = counter.duration.selectedvalue / branch = [if(counter.x.unselectedcount<=0)trial.end else trial.playback] / recorddata = false </trial>
************************************************************************************************************** ************************************************************************************************************** Stimulus Elements ************************************************************************************************************** ************************************************************************************************************** <shape dot> / shape = circle / size = (3.00%, 4.00%) / color = (blue) / erase = false / hposition = expressions.x / vposition = expressions.y </shape>
|