Skip to content
Discussion options

You must be logged in to vote

Hi @FabianRe1,

One way to do this kind of thing is to use a timeline's conditional_function to evaluate whether the trial should run or not.

In this case you'll still add stim 3 to the timeline, but you'll just only have that part of the timeline run if the right conditions are met.

In most circumstances you can't conditionally add things to the timeline based on user input because the timeline is generated before jsPsych.run() is called and so there is no data available to evaluate the conditional statement. This is why the conditional_function approach is normally needed. There is one method .addNodeToEndOfTimeline() that allows for adding to a timeline during the experiment, but it is …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by FabianRe1
Comment options

You must be logged in to vote
0 replies
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