Two questions about programming Cyberball 5 (how to set the type of speed of balls thrown by NPCs...


Two questions about programming Cyberball 5 (how to set the type of...
Author
Message
S.T
S.T
Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)
Group: Forum Members
Posts: 17, Visits: 81
Dave - 1/26/2024


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,
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
S.T - 1/26/2024
Dave - 1/26/2024


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,

You're using the wrong trial's response property.
S.T
S.T
Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)
Group: Forum Members
Posts: 17, Visits: 81
Dave - 1/26/2024

Dear Dave,

Thanks to your numerous helps, the program is about to be completed.

I just have a few more questions.
In Inqusit, I don't understand how to record data.
In this experiment, I want to record player 2 (participant) throwing "when", "to whom", and "at which speed".

What code should I add in the program as I sent you the other day?

Best regard,

S.T
S.T
Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)
Group: Forum Members
Posts: 17, Visits: 81
Dear Dave,

This issue has been resolved.
Thank you.
S.T
S.T
Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)
Group: Forum Members
Posts: 17, Visits: 81
Dave - 1/26/2024

Dear Dave,

Sorry for the frequent questions.
I'm almost there, so please teach me.

When I perform an experiment, I would like to record the following in the data.
"How many milliseconds after the start of the program did the experiment begin?"
"How many milliseconds after the start of the program did each throw go through?"
"How many milliseconds after the start of the program was the participant's response?"

In other words, I want to record the flow of each throw in milliseconds from the start of the program.
However, time as a record is just the date and time to the second which I don't need to record.
I don't know what program to use to get the above data.
Could you please tell me how to do this?


Thank you in advance for your help.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
S.T - 3/5/2024
Dave - 1/26/2024

Dear Dave,

Sorry for the frequent questions.
I'm almost there, so please teach me.

When I perform an experiment, I would like to record the following in the data.
"How many milliseconds after the start of the program did the experiment begin?"
"How many milliseconds after the start of the program did each throw go through?"
"How many milliseconds after the start of the program was the participant's response?"

In other words, I want to record the flow of each throw in milliseconds from the start of the program.
However, time as a record is just the date and time to the second which I don't need to record.
I don't know what program to use to get the above data.
Could you please tell me how to do this?


Thank you in advance for your help.

You need to log script.elapsedtime at the points of interest.

https://www.millisecond.com/support/docs/current/html/language/properties/elapsedtime.htm


S.T
S.T
Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)
Group: Forum Members
Posts: 17, Visits: 81
Dear Dave,

I understand.
I will try it.

Thank you.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search