PennController for IBEX › Forums › Support › Using pick with several conditions › Reply To: Using pick with several conditions
Hi Jeremy,
Thank you for your answer, it helps so much!
After a few tests, I’m able to make Case 1 work like a charm, but when it’s Case 0’s turn, it says there’s an error in the running order.
I tried switching the content of Case 1 with Case 0 and it worked fine, so it really seems to be the Case 0 :
that stops everything from working. I can make both experiment work when they are in Case 1, but never in Case 0.
switch (__counter_value_from_server__ % 2) {
case 0:
n_families_total = 18;
n_families_keep = 18;
conditions_families = ["a","b","c","d", "e", "f"];
families = [...new Array(n_families_total)].map((v,i)=>conditions.map(c=>String(i+1)+c));
fisherYates(families);
n_fillers_total = 36;
conditions_fillers = ["Reg","NPI", "NPIWeird", "ConnOK", "ConnWeird", "Pléonasme", "NoPléonasme"];
fillers = [...new Array(n_fillers_total)].map((v,i)=>conditions_fillers.map(c=>"Leurre"+String(i+1)+c));
Sequence(
"counter",
"Intro",
rshuffle(
anyOf(...families.slice(0,n_families_keep).map((v,i)=>v[i%conditions_families.length]).flat()),
anyOf(...fillers.slice(0,n_families_keep).map((v,i)=>v[i%conditions_fillers.length]).flat())
)
);
break;
// Expérience Argumentation : Shuffled : 18 trials (3 x 6 conditions) / 36 fillers (18 Reg, 18 autres (x2 conditions))
case 1:
n_families_total = 18;
n_families_keep = 9;
conditions = ["cond1","cond2", "cond3"];
families = [...new Array(n_families_total)].map((v,i)=>conditions.map(c=>String(i+1)+c));
fisherYates(families);
Sequence(
"counter",
"Intro",
rshuffle(
randomize(anyOf(...families.slice(0,n_families_keep).map((v,i)=>v[i%conditions.length]))),
randomize(startsWith("Leurre")))
);
break;
}
SetCounter("inc",1).label("counter");
newTrial("Intro",
newText("TexteIntro", "Bonjour, merci").print(),
newButton("BoutonIntro", "Iciici").print().wait()
);
Template("AllFinalExpV2.csv", row =>
newTrial(row.Famille + row.Cond,
(row.Group == "A" ? [
newText(
...
The (row.Group == "A" ? [
line is to have different experiment (slider VS scale). I tried to remove it (and what comes with it) to see if it was the problem, but even without it the same thing happens.
Any help is appreciated 🙂
Thank you very much,
Josiane