error sound and quit button


Author
Message
Johanne
Johanne
Partner Member (856 reputation)Partner Member (856 reputation)Partner Member (856 reputation)Partner Member (856 reputation)Partner Member (856 reputation)Partner Member (856 reputation)Partner Member (856 reputation)Partner Member (856 reputation)Partner Member (856 reputation)
Group: Forum Members
Posts: 5, Visits: 46
Hello, 

I have two questions concerning a script I'm writing with Inquisit 3. 
1) I would like a  errorfeedback when the participant makes a mistake. 
I tried to program this, however it does not seem to work. 

<item errorsound>
/1 = "errorsound.wav"
</item>

<sound errorfeedbacksound>
/items = errorsound
</sound>

<trial testA>
/ ontrialbegin = [if (trial.testA.correct == false) sound.errorfeedbacksound]
/ stimulusframes = [1=correctAnswer, one, two, three, four, five, six, seven, eight, nine, ten,
   eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, numbers, quitbuttona]
/ validresponse = (correctAnswer, one, two, three, four, five, six, seven, eight, nine, ten,
  eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, quitbuttona)
/ correctresponse = (correctAnswer)
/ correctmessage = true(correctMark, 0)
/ errormessage = true(errorMark, 0)
</trial>

2) Furthermore, I would like a quit button during every task (when the participant clicks on the button the task stops).
I was wondering if it is also possible to have this in a openended trial. 

<openended testC>
/ stimulusframes = [1 = testC, stoppen]
/ iscorrectresponse = [
values.response = toupper(openended.testC.response);
values.response = replaceall(values.response, " ", "");
values.correctAnswer = getitem(item.testC_correctAnswers,text.testC.currentitemnumber);
values.response == values.correctAnswer;
]
/ validresponse = (quitbuttonc, anyresponse, correctAnswer)
/ ontrialend = [
insert(item.testAccuracy_easy,openended.testC.correct, 1);
if (openended.testC.correct) {
insert(item.testlatencies_easy,openended.testC.latency, 1);
} ;
if (openended.testC.response != "") {
values.countAttempted = values.countAttempted + 1;
}]
/ontrialend = [if (trial.testC.response == "quitbuttonc")
{values.quittimec = block.testC.elapsedtime;
values.quitc = 1;}]
/ buttonlabel = "volgende"
/ timeout = 20000
/ errormessage = true(errorfeedback, 500)
/ correctmessage = true(correctfeedback,500)
/ ontrialend = [values.testCCorrect = trial.testC.numCorrect]
</openended>

<block testC>
/ stop = [values.quitc == 1]
/ trials = [1-25 = testC]
/ timeout = 1200000
</block>


Thanks in advance!
Johanne
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search