Millisecond Forums

Cyberball ball response delay

https://forums.millisecond.com/Topic26006.aspx

By EstherKlinkenberg - 11/5/2018

Dear all,

For my adjusted cyberball experiment I would like to modify the time interval between the mouse click of the participant and the "response of the ball". For example, the participant clicks on player 1 to throw the ball to player 1 but the gif showing the ball movement will only start 500 ms after the mouse click.

Is it possible to do this in Inquisit? Or do I have to modify the gif so that it will just show a picture for the first 500 ms?

script for player 3 throwing ball to player 2 (participant) and player 2 to player 1:

<trial 3to2>
/ontrialbegin = [values.player = 2]
/ stimulusframes = [1= 3to2, player1label, player2label, player3label, player4label]
/ validresponse = (text.player1label, text.player3label, text.player4label)
/ inputdevice = mouse
/ontrialend = [if (trial.3to2.response == "player1label") {values.recipient = 1; values.count_player2throws += 1}]
/ontrialend = [if (trial.3to2.response == "player3label") {values.recipient = 3; values.count_player2throws += 1}]
/ontrialend = [if (trial.3to2.response == "player4label") {values.recipient = 4;values.count_player2throws += 1}]
/ branch = [if (values.recipient == 1) trial.2to1]
/ branch = [if (values.recipient == 3) trial.2to3]
/ branch = [if (values.recipient == 4) trial.2to4]
</trial>

<trial 2to1>
/ontrialbegin = [values.player = 1]
/ stimulusframes = [1= 2to1, player1label, player2label, player3label, player4label]
/ validresponse = (noresponse)
/ inputdevice = mouse
/ontrialend = [if (list.player1schedule.nextvalue == 2) {values.recipient = 2; values.count_player1throws += 1}]
/ontrialend = [if (list.player1schedule.nextvalue == 3) {values.recipient = 3; values.count_player1throws += 1}]
/ontrialend = [if (list.player1schedule.nextvalue == 4) {values.recipient = 4; values.count_player1throws += 1}]
/ trialduration = expressions.cyberdecisiontime
/ branch = [if (list.player1schedule.currentvalue == 2) trial.1to2]
/ branch = [if (list.player1schedule.currentvalue == 3) trial.1to3]
/ branch = [if (list.player1schedule.currentvalue == 4) trial.1to4]

Thank you in advance!

Kind regards,

Esther
By Dave - 11/5/2018

EstherKlinkenberg - Tuesday, November 6, 2018
Dear all,

For my adjusted cyberball experiment I would like to modify the time interval between the mouse click of the participant and the "response of the ball". For example, the participant clicks on player 1 to throw the ball to player 1 but the gif showing the ball movement will only start 500 ms after the mouse click.

Is it possible to do this in Inquisit? Or do I have to modify the gif so that it will just show a picture for the first 500 ms?

script for player 3 throwing ball to player 2 (participant) and player 2 to player 1:

<trial 3to2>
/ontrialbegin = [values.player = 2]
/ stimulusframes = [1= 3to2, player1label, player2label, player3label, player4label]
/ validresponse = (text.player1label, text.player3label, text.player4label)
/ inputdevice = mouse
/ontrialend = [if (trial.3to2.response == "player1label") {values.recipient = 1; values.count_player2throws += 1}]
/ontrialend = [if (trial.3to2.response == "player3label") {values.recipient = 3; values.count_player2throws += 1}]
/ontrialend = [if (trial.3to2.response == "player4label") {values.recipient = 4;values.count_player2throws += 1}]
/ branch = [if (values.recipient == 1) trial.2to1]
/ branch = [if (values.recipient == 3) trial.2to3]
/ branch = [if (values.recipient == 4) trial.2to4]
</trial>

<trial 2to1>
/ontrialbegin = [values.player = 1]
/ stimulusframes = [1= 2to1, player1label, player2label, player3label, player4label]
/ validresponse = (noresponse)
/ inputdevice = mouse
/ontrialend = [if (list.player1schedule.nextvalue == 2) {values.recipient = 2; values.count_player1throws += 1}]
/ontrialend = [if (list.player1schedule.nextvalue == 3) {values.recipient = 3; values.count_player1throws += 1}]
/ontrialend = [if (list.player1schedule.nextvalue == 4) {values.recipient = 4; values.count_player1throws += 1}]
/ trialduration = expressions.cyberdecisiontime
/ branch = [if (list.player1schedule.currentvalue == 2) trial.1to2]
/ branch = [if (list.player1schedule.currentvalue == 3) trial.1to3]
/ branch = [if (list.player1schedule.currentvalue == 4) trial.1to4]

Thank you in advance!

Kind regards,

Esther

If you add either a 500 ms /pretrialpause or /posttrialpause to the <trial> elements, that should do the trick.

<trial 2to1>
/ pretrialpause = 500
...
</trial>

Alternatively, you can change /stimulusframes to /stimulustimes and only display the stimuli starting 500ms into the <trial>

/ stimulustimes  =  [500 =  2to1, player1label, player2label, player3label, player4label]

and if you want to delay just the video, but not the other stimuli, do

/ stimulustimes  =  [0= , player1label, player2label, player3label, player4label; 500 =  2to1]
By EstherKlinkenberg - 11/11/2018

Dave - Tuesday, November 6, 2018
EstherKlinkenberg - Tuesday, November 6, 2018
Dear all,

For my adjusted cyberball experiment I would like to modify the time interval between the mouse click of the participant and the "response of the ball". For example, the participant clicks on player 1 to throw the ball to player 1 but the gif showing the ball movement will only start 500 ms after the mouse click.

Is it possible to do this in Inquisit? Or do I have to modify the gif so that it will just show a picture for the first 500 ms?

script for player 3 throwing ball to player 2 (participant) and player 2 to player 1:

<trial 3to2>
/ontrialbegin = [values.player = 2]
/ stimulusframes = [1= 3to2, player1label, player2label, player3label, player4label]
/ validresponse = (text.player1label, text.player3label, text.player4label)
/ inputdevice = mouse
/ontrialend = [if (trial.3to2.response == "player1label") {values.recipient = 1; values.count_player2throws += 1}]
/ontrialend = [if (trial.3to2.response == "player3label") {values.recipient = 3; values.count_player2throws += 1}]
/ontrialend = [if (trial.3to2.response == "player4label") {values.recipient = 4;values.count_player2throws += 1}]
/ branch = [if (values.recipient == 1) trial.2to1]
/ branch = [if (values.recipient == 3) trial.2to3]
/ branch = [if (values.recipient == 4) trial.2to4]
</trial>

<trial 2to1>
/ontrialbegin = [values.player = 1]
/ stimulusframes = [1= 2to1, player1label, player2label, player3label, player4label]
/ validresponse = (noresponse)
/ inputdevice = mouse
/ontrialend = [if (list.player1schedule.nextvalue == 2) {values.recipient = 2; values.count_player1throws += 1}]
/ontrialend = [if (list.player1schedule.nextvalue == 3) {values.recipient = 3; values.count_player1throws += 1}]
/ontrialend = [if (list.player1schedule.nextvalue == 4) {values.recipient = 4; values.count_player1throws += 1}]
/ trialduration = expressions.cyberdecisiontime
/ branch = [if (list.player1schedule.currentvalue == 2) trial.1to2]
/ branch = [if (list.player1schedule.currentvalue == 3) trial.1to3]
/ branch = [if (list.player1schedule.currentvalue == 4) trial.1to4]

Thank you in advance!

Kind regards,

Esther

If you add either a 500 ms /pretrialpause or /posttrialpause to the <trial> elements, that should do the trick.

<trial 2to1>
/ pretrialpause = 500
...
</trial>

Alternatively, you can change /stimulusframes to /stimulustimes and only display the stimuli starting 500ms into the <trial>

/ stimulustimes  =  [500 =  2to1, player1label, player2label, player3label, player4label]

and if you want to delay just the video, but not the other stimuli, do

/ stimulustimes  =  [0= , player1label, player2label, player3label, player4label; 500 =  2to1]

Hi Dave!

Thank you for your answer!

Using the /pretrialpause seems to work. However, instead of showing nothing during that pause, I'd like there to be a picture as if the participant is still holding the ball.

Is it possible to show a picture during the pretrialpause? (it already continues to show the player labels but I am not sure why).

Kind regards,
Esther Klinkenberg
By Dave - 11/11/2018

EstherKlinkenberg - Monday, November 12, 2018
Dave - Tuesday, November 6, 2018
EstherKlinkenberg - Tuesday, November 6, 2018
Dear all,

For my adjusted cyberball experiment I would like to modify the time interval between the mouse click of the participant and the "response of the ball". For example, the participant clicks on player 1 to throw the ball to player 1 but the gif showing the ball movement will only start 500 ms after the mouse click.

Is it possible to do this in Inquisit? Or do I have to modify the gif so that it will just show a picture for the first 500 ms?

script for player 3 throwing ball to player 2 (participant) and player 2 to player 1:

<trial 3to2>
/ontrialbegin = [values.player = 2]
/ stimulusframes = [1= 3to2, player1label, player2label, player3label, player4label]
/ validresponse = (text.player1label, text.player3label, text.player4label)
/ inputdevice = mouse
/ontrialend = [if (trial.3to2.response == "player1label") {values.recipient = 1; values.count_player2throws += 1}]
/ontrialend = [if (trial.3to2.response == "player3label") {values.recipient = 3; values.count_player2throws += 1}]
/ontrialend = [if (trial.3to2.response == "player4label") {values.recipient = 4;values.count_player2throws += 1}]
/ branch = [if (values.recipient == 1) trial.2to1]
/ branch = [if (values.recipient == 3) trial.2to3]
/ branch = [if (values.recipient == 4) trial.2to4]
</trial>

<trial 2to1>
/ontrialbegin = [values.player = 1]
/ stimulusframes = [1= 2to1, player1label, player2label, player3label, player4label]
/ validresponse = (noresponse)
/ inputdevice = mouse
/ontrialend = [if (list.player1schedule.nextvalue == 2) {values.recipient = 2; values.count_player1throws += 1}]
/ontrialend = [if (list.player1schedule.nextvalue == 3) {values.recipient = 3; values.count_player1throws += 1}]
/ontrialend = [if (list.player1schedule.nextvalue == 4) {values.recipient = 4; values.count_player1throws += 1}]
/ trialduration = expressions.cyberdecisiontime
/ branch = [if (list.player1schedule.currentvalue == 2) trial.1to2]
/ branch = [if (list.player1schedule.currentvalue == 3) trial.1to3]
/ branch = [if (list.player1schedule.currentvalue == 4) trial.1to4]

Thank you in advance!

Kind regards,

Esther

If you add either a 500 ms /pretrialpause or /posttrialpause to the <trial> elements, that should do the trick.

<trial 2to1>
/ pretrialpause = 500
...
</trial>

Alternatively, you can change /stimulusframes to /stimulustimes and only display the stimuli starting 500ms into the <trial>

/ stimulustimes  =  [500 =  2to1, player1label, player2label, player3label, player4label]

and if you want to delay just the video, but not the other stimuli, do

/ stimulustimes  =  [0= , player1label, player2label, player3label, player4label; 500 =  2to1]

Hi Dave!

Thank you for your answer!

Using the /pretrialpause seems to work. However, instead of showing nothing during that pause, I'd like there to be a picture as if the participant is still holding the ball.

Is it possible to show a picture during the pretrialpause? (it already continues to show the player labels but I am not sure why).

Kind regards,
Esther Klinkenberg

It's not possible to draw stimuli to the screen during /pretrialpause. What you can do is draw what you want displayed before then, i.e. at the end of the preceding trial, and set that stimulus to /erase = false. Otherwise, don't use the /pretrialpause approach but the /stimulustimes option I described earlier. Then you can draw stimuli to the screen whenever you want.