Trial duration enabled in Alternating Serial Reaction Time (ASRT) task.
Testing script from
Vékony, T. (2021). Alternating Serial Reaction Time Task created with jsPsych (Version 1.0.0) [Computer software]. https://doi.org/10.5281/zenodo.7124730
Built with Code Editor
See https://github.com/jspsych/jsPsych/discussions/3223. Thank you to Shaobin Jiang!
Key change: adding data.key_press !== false &&
in the following chunk.
/*function for inserting the same random element after incorrect response*/
function randomRepeat(actualRandom) {
return {
timeline: [randomIncorrectTrialProperties],
timeline_variables: actualRandom.timeline_variables,
conditional_function: function () { //function only happens is response is not correct!
let data = jsPsych.data.get().last(1).values()[0];
return data.key_press !== false && data.correct !== true;
}
}
}
Fully open! Access by URL and searchable from the Open Materials search page