+xHello all,
I have purchased Inquisit 5 but because of the parallel port issue we cannot change the computer which is compatible with Inquisit 4. That is why I am desperately trying to write MID task on Inquisit 4 to use with EEG. So far I assume that I fixed some errors but I still have some problems with the script. Expressions part and trial.incentive part don't work. Can you please help me??
<expressions >
/ meanRT_baseline = trial.baseline.totalmeanlatency
/ SD_baseline = trial.baseline.totalsdlatency
/ baselineRT60 = 0.2533*expressions.SD_baseline + expressions.meanRT_baseline
/ determineDuration = round(expressions.baselineRT60)
/ propCorrect_IncentiveReward = values.countcorrect_IncentiveReward/values.count_IncentiveReward
/ propCorrect_NonIncentiveReward = values.countcorrect_NonIncentiveReward/values.count_NonIncentiveReward
/ propCorrect_IncentivePunishment = values.countcorrect_IncentivePunishmnet/values.count_IncentivePunishment
/ propCorrect_NonIncentivePunishment = values.countcorrect_NonIncentivePunishment/values.count_NonIncentivePunishment
/ propCorrect_IncentiveControl = values.countcorrect_IncentiveControl/values.count_IncentiveControl
/ propCorrect_NonIncentiveControl = values.countcorrect_NonIncentiveControl/values.count_NonIncentiveControl
</expressions>
You have not defined any of the values your expressions element expects. You need to do that, i.e. add those to the script's existing <values> element or define an additional one.
<values>
/countcorrect_IncentiveReward = 0
/count_IncentiveReward = 0
/countcorrect_NonIncentiveReward = 0
/count_NonIncentiveReward = 0
/countcorrect_IncentivePunishmnet = 0
/count_IncentivePunishment = 0
/countcorrect_NonIncentivePunishment = 0
/count_NonIncentivePunishment = 0
/countcorrect_IncentiveControl = 0
/count_IncentiveControl = 0
/countcorrect_NonIncentiveControl = 0
/count_NonIncentiveControl = 0
</values>
And then, of course, you need to actually make sure those values get updated per your <trial>'s /ontrialend logic. Otherwise they won't do anything useful. I.e.
<trial incentive>
...
/ ontrialend = [
trial.incentive.resetstimulusframes();
values.iti = values.trialduration - values.cueduration - values.delayduration - trial.incentive.latency - values.feedbackduration;
if (values.exp_condition == 0) {
values.count_IncentiveControl += 1;
values.countcorrect_IncentiveControl += trial.incentive.correct; list.successIncentive_Control.insertitem(trial.incentive.correct, 1);
} else if (values.exp_condition == 1) {
values.count_IncentiveReward += 1;
values.countcorrect_IncentiveReward += trial.incentive.correct; list.successIncentive_Reward.insertitem(trial.incentive.correct, 1);
} else if (values.exp_condition == 2) {
values.count_IncentivePunishment += 1;
values.countcorrect_IncentivePunishmnet += trial.incentive.correct; list.successIncentive_Punishment.insertitem(trial.incentive.correct, 1);
} ;
]
/ branch = [trial.feedback]
</trial>
Analogously for <trial nonincentive>, i.e. update the *nonincentive* count and correct count values there.
Then:
<trial incentive>
...
/ response = timeout(values.targetduration)
/ validresponse = (values.responsekey)
/ correctresponse = (values.responsekey)
...
</trial>
is not valid Inquisit 4 syntax and needs to read
<trial incentive>
...
/ timeout = values.cueduration + values.delayduration + values.targetduration
/ isvalidresponse = [trial.incentive.response == values.responsekey]
/ iscorrectresponse = [trial.incentive.response == values.responsekey]
...
</trial>
instead. Again, you need to change <trial nonincentive>
analogously.