+xHi Dave,
Thanks for pointing me to this function!
Unfortunately I don't think it's working. I tried making a giant white rectangle to mask out the stimulus right after it was displayed. The rectangle never appears, and the stimulus is visible for the entire duration of the trial (when I only want it to be visible for a few milliseconds). Am I doing something wrong here?
<values>
/buttonRT = 205
</values>
<shape whiteRectangle>
/ shape = rectangle
/ color = white
/ size = (1000, 1000)
</shape>
<trial example>
/ ontrialbegin = [
trial.example.resetstimulusframes():
trial.example.insertstimulustime(shape.whiteRectangle, values.buttonRT);
]
/ stimulustimes = [0=target; 200=values.wordredcolorredup]
/ trialduration = 1800
</trial>
There's a typo in the code (which originated with my example).
/ ontrialbegin = [
trial.example.resetstimulusframes()
: trial.example.insertstimulustime(shape.whiteRectangle, values.buttonRT);
]
needs to be
/ ontrialbegin = [
trial.example.resetstimulusframes()
;trial.example.insertstimulustime(shape.whiteRectangle, values.buttonRT);
]
to work.
Another problem is the chosen timing: Your display would have to be running at 200Hz for a 5ms display onset difference between the stimulus and the rectangle to be possible. If your display is running at a lower rate, which is likely, then the stimulus and the rectangle will be drawn to the screen at the exact same time, i.e. you'll never see the target to begin with.
<values>
/buttonRT = 210
</values>
<shape whiteRectangle>
/ shape = rectangle
/ color = white
/ size = (100%, 100%)
</shape>
<trial example>
/ ontrialbegin = [
trial.example.resetstimulusframes();
trial.example.insertstimulustime(shape.whiteRectangle, values.buttonRT);
]
/ stimulustimes = [0=target; 200=red]
/ trialduration = 1800
</trial>
<text target>
/ items = ("Target")
</text>
<text red>
/ items = ("STIMULUS")
/ txcolor = red
</text>
<block my>
/ trials = [1-4 = example]
</block>