Skip to content
Discussion options

You must be logged in to vote

Hi @Altr37, I can't remember what version of jsPsych you're using, but if it's not the most recent version then you may need to add the second true argument to `jsPsych.timelineVariable('question') inside your conditional function, like this:

var question_conditional = {
  timeline: [question],
  conditional_function: function() {
    // check whether or not the question trial should be presented
    if (jsPsych.timelineVariable('question', true) == null) {      // <--- added true argument here
      return false;
    } else {
      return true;
    }
  }
}

Also, just to check: in the cases where you don't want a question, is the question value just the word null (with no quotes around it…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by becky-gilbert
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