+xHi there, hoping someone can help.
I've downloaded the AAT script from the website and modified it to show my images and its all working well. What I want to do now is display a message to participants saying "Incorrect" after each trial where they make an error.
I've tried putting the /errormessage option in the block but this seems to mess things up a lot and doesn't work.
Has anyone had any success in adding error feedback to this script?
I've attached my working version of the script but I haven't made many changes to the downloaded script other than to the items and the number of stimulus categories/trial types.
If you want to display error feedback *after* each trial, can fold that into the enddecrease and endincrease <trial> elements. Something like that:
<trial endincrease>
/ ontrialbegin = [
if (values.expcondition == 1 && values.targetformat == "l") {
trial.endincrease.insertstimulustime(text.error, 0);
} else if (values.expcondition == 2 && values.targetformat == "p"){
trial.endincrease.insertstimulustime(text.error, 0);
};
]
/ ontrialbegin = [
picture.targetstimulus.height = picture.targetstimulus.height + values.joystick_change/1000 * expressions.maxheightchange_px
]
/ ontrialend = [
trial.endincrease.resetstimulusframes();
]
/ stimulusframes = [1 = targetstimulus]
/ trialduration = 2000
/ branch = [trial.joystickrest]
/ recorddata = false
</trial>
<trial enddecrease>
/ ontrialbegin = [
if (values.expcondition == 1 && values.targetformat == "p"){
trial.enddecrease.insertstimulustime(text.error, 0);
}else if (values.expcondition == 2 && values.targetformat == "l"){
trial.enddecrease.insertstimulustime(text.error, 0);
};
]
/ ontrialbegin = [
picture.targetstimulus.height = picture.targetstimulus.height - values.joystick_change/1000 * expressions.maxheightchange_px;
]
/ ontrialend = [
trial.enddecrease.resetstimulusframes();
]
/ stimulusframes = [1 = clearscreen, targetstimulus]
/ trialduration = 2000
/ branch = [trial.joystickrest]
/ recorddata = false
</trial>