Hi All,
I have defined a trial in which certain probe stimuli are shown and the observer has to click on a specific one of those stimuli (i.e., inputdevice = mouse). All stimuli are presented in front of a screen-wide background stimulus covering the complete display area. This background stimulus is not contained in the /validresponse property.
The names of the actual probe stimuli all contain a trailing index number so that I should be able to do this:
/ iscorrectresponse = [evaluate(substring(trial.trialname.response,5,1)) == 5]
What I'd expect to happen is that the /iscorrectresponse property is only invoked when the observer clicks on one of the valid stimuli. It shall not be invoked if the observer clicks somewhere in the background.
This is not what happens. The /iscorrectresponse property is invoked every time the observer clicks anywhere. Hence, the code produces expression errors whenever the background stimulus - the name of which does not end with a number - is clicked.
Is that supposed to happen?