+xI ran the script you provided and The current script works like this: first time I clicked the screen, produced a dot. Then the 2nd click, no dots produced. The third time I clicked produced the second dot. The 4th time I clicked erased the first dot. The thing I want is: first time I clicked the screen, produced a dot. Then the 2nd click, the second dots produced. Now two dots remain visible on the screen. The 1st dot erased(without extra click) at the beginning of the 3rd tap trial. The 3rd click produced the 3rd dot. Now two dots (2nd,3rd) remains visible....Is there a way to fix the current script:)?
Then you need two "dot" stimuli and you need to actually have your release trial set the position of its dot.
<block myblock>
/ trials = [1-10=tap]
/ screencolor = white
</block>
<values>
/ ay=0
/ ax=0
/ by=0
/ bx=0
/trialnum=0
</values>
<trial tap>
/ ontrialend = [values.trialnum+=1]
/ validresponse = (screen)
/ stimulustimes = [0=screen, a,b]
/ ontrialend = [values.ax=(trial.tap.responsex/display.width)*100%; values.ay=(trial.tap.responsey/display.height)*100%]
/ inputdevice = mouse
/ branch = [trial.release]
</trial>
<trial release>
/ stimulustimes = [0=a,b]
/ ontrialend = [values.bx=(trial.release.responsex/display.width)*100%; values.by=(trial.release.responsey/display.height)*100%]
/ validresponse =(lbuttondown)
/ inputdevice = mouse
</trial>
<shape a>
/ color = blue
/ shape = circle
/ position = (values.ax,values.ay)
/ size = (10px,10px)
/ erase = false
</shape>
<shape b>
/ color = green
/ shape = circle
/ position = (values.bx,values.by)
/ size = (10px,10px)
/ erase = false
</shape>
<shape screen>
/ shape = rectangle
/ color = white
/ size = (1920px, 1200px)
/ position = (960px, 600px)
/ erase = false
</shape>