Skip to content
Discussion options

You must be logged in to vote

Hi @mary-9555, can you say more about what's happening when you run the code? Are you seeing any errors in the browser's JavaScript console?

I did notice a few things:

  1. The jsPsych.pluginAPI.compareKeys function is just meant for comparing keyboard responses, not button responses. So in your image_trial, you should compare the participant's response and correct response directly in the on_finish function. The participant's button response is stored using the indices in the choices array, and in your case "sad" is the first button choice (index = 0), so you want to check if the response was "sad" like this: if (data.response == 0) { ...
  2. In your feedback trial, using the instructions plugin…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mary-9555
Comment options

@becky-gilbert
Comment options

@mary-9555
Comment options

Answer selected by mary-9555
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