Hi,
I'am trying to adjust the Effort Expenditure for Reward (EEfRT) task I found in the library (
http://www.millisecond.com/download/library/EffortExpenditureforRewardTask/) This task consists of easy and hard trials (button presses with the index finger of the dominant hand VS button presses with the little finger of the non-dominant hand. In the inquistit version of this task, both hard en easy trials are performed by pressing the spacebar. Each button press raises a bar up a little. In the original version however, two different keys are used "s" and "l". If right handed, for easy trials, participants press the "l" with their right-hand index finger, and for difficult trials the press the "s" with their left-hand little finger, for left handed-participants this is reversed. I want to use this two different button version of the task.
I am experiences problems making the validresponse option conditional on the handedness of the participant.
I first asked participants whether they are right- or left-handed:
<radiobuttons hand>
/ caption = "Are you left or right-handed?"
/ options = ("Left","Right")
/ optionvalues = ("1","2")
/ position = (50%, 50%)
/ required = true
</radiobuttons>
Then I want to change the following trial, where the spacebar is indicated as valid, into a conditional valid response:
<trial hard>
/ stimulusframes = [1 = buttonpress, outerbox, innerbox, filling]
/ validresponse = (57)
/ beginresponsetime = -1
/ ontrialend = [
if (trial.hard.response == 57)
{
values.countpresses += 1;
values.fillingheight += expressions.increasefillingheight;
};
if (values.countpresses >= parameters.hardpresses)
values.success = 1
else
values.success = 0;
values.remainingtaskduration -= trial.hard.latency;
if (values.remainingtaskduration < 0)
values.remainingtaskduration = 0;
]
/ branch = [
if (values.success == 0 && values.remainingtaskduration > 0) trial.hard
else if (values.success == 1) trial.success
else trial.failure
]
/ recorddata = false
/ timeout = values.remainingtaskduration
</trial>
I tried:
/ validresponse = (if (radiobuttons.hand.response==1)] 38 else 31) but this is not allowed.
In addition, the following part:
"/ ontrialend = [
if (trial.hard.response == 57)" has to be made conditional as well.
Do you have any suggestions how to proceed?
regards,
Maurits