Millisecond Forums

Displaying message when a non-valid response is entered

https://forums.millisecond.com/Topic12012.aspx

By Marina - 1/2/2014

Hi,
I would like inquisit to display a message if/when a user presses a non-valid key (e.g. if the valid keys are 'a' and 'z', and the participant presses 'f', I want to display "please press A for choice a, or Z for choice b"), but can't figure out how to do it from within the trial. Any suggestions would be appreciated!

Marina
By Dave - 1/2/2014

To do this you would have to

(1) set the <trial>'s /validresponse to accept 'anyresponse' and then

(2) display that message via a whole bunch of /responsemessage attributes.
By Marina - 1/2/2014

Thanks Dave,
I figured this might be the case, but thought I'd ask just in case.
I tried to work around this by instead displaying a message after a 6-second delay if there is no response, reminding the participants of which keys to press. However, even though I set /responseinterrupt = immediate, it still waits out the full 6 seconds and displays the message, even if a valid response is entered right away. I include my code below. Any suggestions for how to fix this?


<trial choice>
/ validresponse = ("F", "J" "4" "6")
/ stimulustimes = [0 = easychoice_left, hardchoice_right; 6000 = reminder]
/ posttrialpause = 250
/responseinterrupt = immediate
/responsetrial = ("F", trial_add1)
/responsetrial = ("4", trial_add1)
/responsetrial = ("J", trial_add3)
/responsetrial = ("6", trial_add3)
/ontrialend = [values.totaltrials = values.totaltrials +1]
</trial> 
By Dave - 1/2/2014

Completing the full stimulus presentation sequence as given in /stimulustimes or /stimulusframes prior to accepting any responses is the expected (default) behavior. You can override this by specifying the /beginresponsetime or /beginresponseframe attribute (formerly /responsetime and /responseframe).