I need to shuffle the order of a block of multiple choice buttons. I trying this:
Block to setVariable
Block with shuffle script
Block to show the options.
function shuffle(array) {
array.sort(() => Math.random() - 0.5);
}
let x = {{options}};
shuffle({x);
setVariable({{options}}, x);
does not work
2 Replies
try using this script :
uncheck "Execute on client?" because the
setVariable
function is only available in script executed on the server
thanks. It works perfectly