+x
Dear, Dave
Thank you for your reply.
I understand that I will use the responsetext property if I need the characters.
Now that I can experiment with numbers, I changed it to numbers instead of characters, as in the following code.
However, whether I select "1" or "2", it cannot be thrown in Fastspeed, but only in Slowspeed.
What am I doing wrong?
The code is as below
<trial player2speed>
/ ontrialbegin = [
values.received_from = values.ball_at;
expressions.set_offsets;
values.player2received += 1;
values.player1state = 1;
//catch
values.player2state = 2;
values.player3state = 1;
values.player4state = 1;
values.player5state = 1;
values.player6state = 1;
values.player7state = 1;
values.player8state = 1;
values.player9state = 1;
values.ball_at = 2;
values.throw_to = list.throwschedule.nextvalue;
values.delay = list.delayschedule.nextvalue;
]
/ ontrialend = [
if (trial.player2speed.response == "slow") {
parameters.throwspeed = parameters.slowspeed;
} else if (trial.player2speed.response == "fast") {
parameters.throwspeed = parameters.fastspeed;
};
]
/ stimulusframes = [1=clearscreen, player1, player2, player3, player4, player5, player6, player7, player8, player9,
player1label, player2label, player3label, player4label, player5label, player6label, player7label, player8label, player9label,
player1avatar, player2avatar, player3avatar, player4avatar, player5avatar, player6avatar, player7avatar, player8avatar, player9avatar,
stats, slow, fast]
/ validresponse = ("1", "2")
/ responsemessage = ("1", button.slow, 100)
/ responsemessage = ("2", button.fast, 100)
/ inputdevice = keyboard
/ branch = [
if (trial.player2.response == "2") {
parameters.throwspeed = parameters.slowspeed;
};
]
/ branch = [
if (trial.player2.response == "3") {
parameters.throwspeed = parameters.fastspeed;
};
]
/ branch = [
return trial.player2;
]
/ recorddata = false
</trial>
<button slow>
/ caption = "SLOW THROW"
/ size = (15%, 8%)
/ position = (50%, 45%)
/ fontstyle = ("Verdana", 3%, true)
</button>
<button fast>
/ caption = "FAST THROW"
/ size = (15%, 8%)
/ position = (50%, 55%)
/ fontstyle = ("Verdana", 3%, true)
</button>
Sorry for asking so many questions.
Many thanks for your always prompt and clear answers.
Respectfully yours,