URL of experiment: https://pavlovia.org/run/Lucy23/spatial_localisation/html/
Description of the problem:
What do I want to happen?
I am looking to add a counter balancing code component for an online experiment with 2 possible orders (task 1 and 2 first or task 3 and 4 first)
What have I tried?
I have conditions files called conditionsAB.xlsx and conditionsBA.xlsx in my experiment folder which define the number of nReps for each condition (as shown in the documentation here: Blocks of trials and counterbalancing — PsychoPy v2021.1
and see screen shot of my loop structure below following the counter balancing different subtasks). They have not yet been imported to my html folder.
The inner loops are the subtasks (1 and 2) and (3 and 4)
The outer loop is control Task Order as shown on documentation. The references to trial 1 and trial 2 is unrelated to the counter balancing as its purely because the time line of trial 1 and trial 2 onwards is different.
These conditions files are called to the outer most loop by typing
$“conditions”+”group”+”.xlsx” into the box for conditions files (see screen shot).
The conditions files look like this (with conditionsBA.xlsx being set up as nRepsTask 1 as 0 on the first row 1 on the second row etc.)
Then my if statement to decide which group it will be based on if the participant number is odd or even (in a code component in my instructions Instr3 routine) looks like this…
What happened when I did this?
I got an error saying unknown source (see screen shot). I’m guessing that this is because my if statement isn’t working but I’m not sure why.