URL of experiment:
Description of the problem:
The loop is not behaving as it is supposed to online and is behaving very strangely.
The way the loop is supposed to work:
(1) object is correct if within 150 pixels (i.e., inside the polygon i’ve included for easy testing)
(2) if an object is answered correctly twice in a row , (i.e., on two consecutive occasions that item, e.g., cow is attempted) it drops from the loop (i.e., its value goes from 0>1>2; if it is answered incorrectly, its value in the dict drops to 0 - the values for the other objects should stay the same here and they should still be skipped if their value reaches 2)
(3) loop terminates when all objects placed in correct location twice in a row (i.e., all objects values are 2 in dict).
The java script is behaving in the current undesirable way:
(0) if the participant answers all questions correctly the loop terminates as it should
(1) if an object is answered incorrectly it seems to reset to 0 as desired
(2) it will then finish all the objects in the that round of the loop
(3) it will then demand two new full loops in which I answer the original incorrect trial correctly (i.e., it is not skipping)
(4) then it will start a final round of the loop and terminate only once it reaches the object I originally answered incorrectly
note* currently I have all values of objects in dict set to 1 for quicker testing.
note* works fine in psychopy builder and has done since Feb, I just can’t get it going in the browser
note - @jonathan.kominsky made the helpful suggestion that it may have something to do with how the dictionary updates between loops. I am starting to look into learning some basic debugging but progress is slow as I have no js training.
Some of the threads I have checked out:
among others - I have a done a LOT of playing around with where the code should go (each frame,end routine, etc)
- i’m at my wits end with this and the only reasonable option I see at this point is to quit my PhD, learn how to live off the land and never look at a computer screen again
Any help much appreciated