Replies: 1 comment 1 reply
-
aguima24: Thank you for providing these samples of your code. I presume all of these segments go between the "script" tags? Could you also please provide the tags you have for any CSS, or jsPsych plugins? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am designing an experiment with a cooperation task, where cooperation is created by pressing two different keyboard keys simultaneously. I wrote the code so that the individuals are required to press the keys "a" and "l" simultaneously (within 80 milliseconds of each other) to move on to the next trial. I also created a conditional and a loop function so that the trial is repeated until the keys are pressed within a 80 millisecond difference. After they meet the 80ms requirement, they can move on. However, my conditional and loop functions are not working properly and the trial repeats indefinitely, even if the 80ms requirement is met. Can someone tell me what is wrong?
Any help is appreciated! Thanks!
Here is part of the code:
` // Trial_4
// This section provides the code that presents the aliens in the spaceship that need to be lauched by the
// joint button press by the kids. I want the children to press the keys "a" and "l" symultaneously to move on
// I also want the code to record how many millisecond apart are the button presses for "a" and "l" keys
// Message Trial for Repeating Trial
// trial 4 should be repeated if the keys are pressed more the 80 milliseconds apart from each other
};
// Conditional Function to Check RT Difference
// Conditional function was created to make sure that the trials repeats if the keys are pressed
// more than 80 ms apart
// Alien Dance Celebration
// Loop to Repeat Trial_4 Until Criteria Met
// loop function was created to repeat trial_4 if the keys are pressed more than 80ms apart
// Timeline
Beta Was this translation helpful? Give feedback.
All reactions