Sorry if this has been answered before but I can't seem to find an answer. I would like to counterbalance the order in which experimental variables are displayed. For example I have two variables:
var variable1 = {
timeline: [
{
type: 'html-keyboard-response',
stimulus: '+',
choices: jsPsych.NO_KEYS,
trial_duration: 200
},
{
type: 'image-keyboard-response',
stimulus: jsPsych.timelineVariable('picture'),
trial_duration: 2000,
choices: [37, 39]
},
],
timeline_variables: [
{picture: 'picture1.png' },
{ picture:'picture2.png' },
],
randomize_order:true,
repetitions:8
}
var variable2 = {
timeline: [
{
type: 'html-keyboard-response',
stimulus: '+',
choices: jsPsych.NO_KEYS,
trial_duration: 200
},
{
type: 'image-keyboard-response',
stimulus: jsPsych.timelineVariable('picture'),
trial_duration: 2000,
choices: [37, 39]
},
],
timeline_variables: [
{picture: 'picture3.png' },
{ picture:'picture4.png' },
],
randomize_order:true,
repetitions:16
}
I would like to randomly display the variables in the experiment, so sometimes variable1 comes first, and sometimes variable 2. This seems very easy but somehow I can't get it to work? Any suggestions would be appreciated! Thanks!!!!