Hi Jeremy,
I’m in the process of creating an experiment in which participants will see many trials divided into 9 blocks separated by a break. To keep them motivated, I’d therefore like to inform them how far along in the experiment they are, e.g., “This is block n of 9.”
Is there any way to do that? For reference, the relevant part of my code looks as follows:
PennController.ResetPrefix(null); // Shorten command names (keep this line here))
function SepWithN(sep, main, n) {
this.args = [sep,main];
this.run = function(arrays) {
assert(arrays.length == 2, "Wrong number of arguments (or bad argument) to SepWithN");
assert(parseInt(n) > 0, "N must be a positive number");
let sep = arrays[0];
let main = arrays[1];
if (main.length <= 1)
return main;
else {
let newArray = [];
while (main.length){
for (let i = 0; i < n && main.length>0; i++)
newArray.push(main.shift());
for (let j = 0; j < sep.length; ++j)
newArray.push(sep[j]);
}
return newArray;
}
};
}
function sepWithN(sep, main, n) { return new SepWithN(sep, main, n); }
// Start with welcome screen, then present test trials in a random order,
// and show the final screen after sending the results
Sequence( "welcome" , "instructions", "practice1" , "practice2", "practice3", "practice4", "begin", sepWithN("break", randomize("test"), 108) , "send" , "final" )