+x+xHi,
I'm completely new in Inquisit. I'm trying to create an experiment on pleasantness judgments: the participant will see on the screen a photo and through two buttons he will be able to choose whether he likes it or not. There are four trials total, and I wish, in case of no-response, for a text to appear on the screen and for the trial to be repeated, but I have some issues. Can somebody help me?
Thanks.
<parameters>
/ numberTrials = 8
</parameters>
<text noresponse>
/ items = ("Try to be faster next time")
</text>
<list practice>
/ items = (trial.selectTrial)
/ poolsize = parameters.numberTrials
</list>
<trial selectTrial>
/ stimulustimes = [0 = clearScreen, fixation]
/ branch = [
if (values.condition == 1){
return trial.congruent;
}
]
/ trialduration = 1000
</trial>
<trial congruent>
/ stimulustimes = [0 = practicefaces, likeds, dislikesx]
/ validresponse = (noresponse, likeds, dislikesx)
/ correctresponse = (likeds, dislikesx)
/ timeout = 3000
/ branch = [
if (trial.congruent_practice.error){
return trial.repeat;
} else {
list.practice.nextvalue;
}
]
</trial>
<trial repeat>
/ontrialbegin = [
if (trial.congruent.response == 0){
trial.repeat.insertstimulusframe(text.noresponse, 1)
}
]
/ timeout = 3000
/ branch = [
list.practice.currentvalue;
]
/ ontrialend = [
trial.repeat.resetStimulusFrames();
]
</trial>
Provide complete, runnable code, not isolated snippets, please. They are not useful and most of what's relevant is missing.
Very sorry,
I'll send the complete code so far. There are two blocks and the function to repeat the trial is implemented only in the trial.congruent_practice (I wanted to solve the problem first and then implement it in the second one too).
Better now?
<defaults>
/ inputdevice = mouse
</defaults>
<parameters>
/ numberPracticeTrials = 8
/ picSize = 25%
/ fixationSize = 15%
/ left_x = 40%
/ right_x = 60%
</parameters>
<values>
/ condition = 1
</values>
<text fixation>
/ items = ("+")
/ fontstyle = ("Arial", parameters.fixationSize, false, false, false, false, 5, 1)
/ position = (50%, 50%)
/ erase = false
/ vjustify = center
</text>
<picture practiceFaces>
/ items = pictureitemspractice
/ select = noreplace
/ size = (parameters.picSize, parameters.picSize)
/ erase = false
</picture>
<item pictureitemspractice>
/ 1 = "1DD_prova.png"
/ 2 = "1DS_prova.png"
/ 3 = "1MD_prova.png"
/ 4 = "1MS_prova.png"
/ 5 = "2DD_prova.png"
/ 6 = "2DS_prova.png"
/ 7 = "2MD_prova.png"
/ 8 = "2MS_prova.png"
/ 9 = "3DD_prova.png"
/ 10 = "3DS_prova.png"
/ 11 = "3MD_prova.png"
/ 12 = "3MS_prova.png"
/ 13 = "4DD_prova.png"
/ 14 = "4DS_prova.png"
/ 15 = "5DD_prova.png"
/ 16 = "5DS_prova.png"
</item>
<picture dislikeds>
/ items = ("dislike.png")
/ position = (parameters.right_x, 90%)
/ size = (30%, 30%)
</picture>
<picture likesx>
/ items = ("like.png")
/ position = (parameters.left_x, 85%)
/ size = (30%, 30%)
</picture>
<picture dislikesx>
/ items = ("dislike.png")
/ position = (parameters.left_x, 90%)
/ size = (30%, 30%)
</picture>
<picture likeds>
/ items = ("like.png")
/ position = (parameters.right_x, 85%)
/ size = (30%, 30%)
</picture>
<text noResponseText>
/ items = ("Cerca di rispondere più velocemente la prossima volta")
/ position = (50%, 20%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ size = (80%, 10%)
/ vjustify = center
/ txcolor = blue
</text>
<list practice>
/ items = (trial.selectTrial_practice)
/ poolsize = parameters.numberPracticeTrials
</list>
<trial selectTrial_practice>
/ stimulustimes = [0 = clearScreen, fixation]
/ branch = [
if (values.condition == 1){
return trial.congruent_practice;
}
else if (values.condition == 2){
return trial.incongruent_practice;
}
]
/ trialduration = 1000
/ recorddata = false
</trial>
<trial congruent_practice>
/ stimulustimes = [0 = practicefaces, likeds, dislikesx]
/ validresponse = (noresponse, likeds, dislikesx)
/ correctresponse = (likeds, dislikesx)
/ timeout = 3000
/ branch = [
if (trial.congruent_practice.error){
return trial.repeat_c;
} else {
list.practice.nextvalue;
}
]
</trial>
<trial incongruent_practice>
/ stimulustimes = [0 = practicefaces, likesx, dislikeds]
/ validresponse = (noresponse, likesx, dislikeds)
/ timeout = 3000
/ branch = [
list.practice.nextvalue;
]
</trial>
<trial repeat_c>
/ontrialbegin = [
if (trial.congruent_practice.response == 0){
trial.repeat_c.insertstimulusframe(text.noResponseText, 1)
}
]
/ timeout = 3000
/ branch = [
list.practice.currentvalue;
]
/ ontrialend = [
trial.repeat_c.resetStimulusFrames();
]
</trial>
<block practice_congruent>
/ stop = [
block.practice_congruent.trialcount >= parameters.numberPracticeTrials
]
/ onblockbegin = [
values.condition = 1;
]
/ trials = [1 = list.practice]
</block>
<block practice_incongruent>
/ stop = [
block.practice_incongruent.trialcount >= parameters.numberPracticeTrials
]
/ onblockbegin = [
values.condition = 2;
]
/ trials = [1 = list.practice]
</block>
<expt GiudizziDiPiacevolezza>
/ blocks = [
1 = practice_congruent;
2 = practice_incongruent
]
</expt>