Millisecond Forums

feedback no response detected

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

By JuliaH - 8/10/2015

Hi,

*just as a disclaimer, I am new to Inquisit and have no background in programming and coding*

I am using the ANT CRSD and would like to display an error feedback with the text "no response detected"  if participants do not give a response.
At this moment the feedback is 'Error'  (when the participant presses the incorrect key AND when there is no response before timeout) or 'Correct (when the participant presses the correct key).

I have already made the following changes to the script:
<item practicefeedback>
/1 = "Error"
/2 = "Correct"
/0 = "No response detected"
</item>

which has had no effect.
I think I have to make an additional change to the following section, but am not sure how to work with the if - else section as I want to have 3 rather than 2 options: 
I would like to add "no response detected" in this format: {text.feedback.textcolor = red; values.selectfeedback = 0

<trial practice_feedback>
/ontrialbegin = [if (values.validcorrect == 1) {text.feedback.textcolor = green; values.selectfeedback = 2} else {text.feedback.textcolor = red; values.selectfeedback = 1}]
/stimulusframes = [1 = fixation, feedback, rtfeedback]
/trialduration = values.practicefeedback_duration
/branch = [trial.iti]
/recorddata = false
</trial>

Thank you for your help!
Julia
By Dave - 8/10/2015

You want

<trial practice_feedback>
/ontrialbegin = [if (values.validcorrect == 1) {text.feedback.textcolor = green; values.selectfeedback = 2}
else if (block.ant_practice.response == "0") {text.feedback.textcolor = red; values.selectfeedback = 3}
else {text.feedback.textcolor = red; values.selectfeedback = 1}]
/stimulusframes = [1 = fixation, feedback, rtfeedback]
/trialduration = values.practicefeedback_duration
/branch = [trial.iti]
/recorddata = false
</trial>

By Dave - 8/10/2015

Please disregard the above for the time being. I think there is a slight mistake which will lead to the wrong feedback being given under certain circumstances. I will post corrected code ASAP.
By Dave - 8/10/2015

This should work more reliably, but let me know if you encounter any problems with it:

<trial practice_feedback>
/ontrialbegin = [if (values.validcorrect == 1) {text.feedback.textcolor = green; values.selectfeedback = 2} else {text.feedback.textcolor = red; values.selectfeedback = 1}]
/ontrialbegin = [if (block.ant_practice.latency >= 1500) {text.feedback.textcolor = red; values.selectfeedback = 3}]

/stimulusframes = [1 = fixation, feedback, rtfeedback]
/trialduration = values.practicefeedback_duration
/branch = [trial.iti]
/recorddata = true
</trial>
By JuliaH - 8/10/2015

Thank you Dave, it works!

What is the reason for changing 
/recorddata = false
to
 /recorddata = true ?

I assumed that before data was not recorded as feedback was given during practice only.
Julia
By Dave - 8/10/2015

No reason except for testing purposes (having a record in the data file that allows for checking whether the proper feedback was presented). Once you've ensured that you can safely set it back to false.
By JuliaH - 8/10/2015

clear, thanks!