iscorrectresponse gets evaluated even if response was not valid


Author
Message
Blackadder
Blackadder
Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)
Group: Forum Members
Posts: 280, Visits: 147
Dear Dave,

your code is spot-on. I'm going to compare our code to yours and post the result here.

Bye, Malte

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Based on your description, I assume you do something along the lines of (greatly simplified)

<block myblock>
/ trials = [1-4=trialname]
</block>

<trial trialname>
/ inputdevice = mouse
/ stimulusframes = [1=background, stim15, stim14]
/ validresponse = (stim15, stim14)
/ iscorrectresponse = [substring(trial.trialname.response,5,1) == "5"]
</trial>

<shape background>
/ shape = rectangle
/ size = (100%, 100%)
/ color = (blue)
</shape>

<text stim15>
/ items = ("A")
/ position = (40%, 50%)
</text>

<text stim14>
/ items = ("B")
/ position = (60%, 50%)
</text>

With the above I am unable to reproduce the issue you observed. The background stimulus is not accepted as response and the /iscorrectresponse evaluation works as expected.

I suspect there is something about your setup that I'm missing; what that is, I unfortunately have no idea.

Blackadder
Blackadder
Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)Supreme Being (27K reputation)
Group: Forum Members
Posts: 280, Visits: 147
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?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search