Trial order does not display properly

URL of experiment: Pavlovia

Description of the problem: In this task the participants view images in triplets twice. As an attention check, we ask the participants to answer whether the order and location of these objects are ‘same’ or ‘different’ during the first and second views ( a ‘different’ trial might display the three objects in the order left-middle-right then right-left-middle as shown in the screenshot). The output displays that it assigns different orders to ‘different’ trials, however during piloting it all the trials look ‘same’, so they are displayed in the same order although the output does not match what is displayed. Any help is much appreciated!!

Annotation 2020-07-29 165703

I think the issue is that you forgot to include the following in secondw_code.

if ((trialType === "LMR")) {
    firstPos = leftPos;
    secondPos = midPos;
    thirdPos = rightPos;
} else if ((trialType === "LRM")) {
    firstPos = leftPos;
    secondPos = rightPos;
    thirdPos = midPos;
} else if ((trialType === "MLR")) {
    firstPos = midPos;
    secondPos = leftPos;
    thirdPos = rightPos;
} else if ((trialType === "RML")) {
    firstPos = rightPos;
    secondPos = midPos;
    thirdPos = leftPos;
} else if ((trialType === "RLM")) {
     firstPos = rightPos;
     secondPos = leftPos;
     thirdPos = midPos;
} else if ((trialType === "MRL")) {
     firstPos = midPos;
     secondPos = rightPos;
     thirdPos = leftPos;
}

You update trialType in the diff trials but don’t use the updated version.

1 Like

Thank you very much @wakecarter this solves it! For some reason I thought having those in the same loop would work but as soon as I copied that code over it started displaying correctly. Thank you again!!