Skip to content
Discussion options

You must be logged in to vote

Hi @rbruno1, you're right that the compareKeys function is just for comparing key presses. To compare a button press response, you can just use the double-equals operator to test if they're the same. Button press responses are stored as numbers in the jsPsych data, so probably best to compare against the number 1 (instead of the '1' string).

Also, your POD_loop_node timeline contains two trials, so the data that's passed to the loop_function parameter will contain the data from both of those trials. I think your goal is to check the button response from the second trial in the timeline? If so, then you want to index the second set of trial data inside of data.values(), which means you'll …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@rbruno1
Comment options

@becky-gilbert
Comment options

@rbruno1
Comment options

@becky-gilbert
Comment options

@rbruno1
Comment options

Answer selected by rbruno1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants