Skip to content
Discussion options

You must be logged in to vote

The following approach seems to work:

  1. Create a separate trial_counter variable.
  2. Add an on_finish function in which you increment the value of the trial_counter variable and add it to the trial data. I noticed that you need to use the on_finish function. Simply adding it to the data key does not show an incremented value.
let trial_counter  = 0;
  let face_name_procedure = {
      timeline: [
          {
              type: jsPsychHtmlKeyboardResponse,
              stimulus: '+',
              choices: "NO_KEYS",
              trial_duration: 500
          },
          {
              type: jsPsychImageKeyboardResponse,
              stimulus: jsPsych.timelineVariable('face'),
         …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mrinmayik
Comment options

Answer selected by mrinmayik
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