Hi Jonathan, I think i’m having a trial-skipping issue that’s related to some of this discussion but I can’t quite get my loop to operate correctly and you seem to have some experience here.
The loop is not behaving as it is supposed to online (works fine locally).
I used your every frame suggestion for some of my code and it made it run better, but still not quite as desired.
I’ll try and explain:
To loop is supposed to work like this:
(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 following undesirable way:
(1) if all trials are answered correctly it terminates exactly when it is supposed to
(2) if an object is answered incorrectly the dict for that object seems to reset to 0 as it is supposed to
(3) it will then finish all the objects in the that round of the loop
(4) it will then demand two new full loops in which I answer the original incorrect trial correctly (i.e., it is not skipping)
(5) then it will start a final round of the loop and terminate only once it reaches the object I originally answered incorrectly (even though that object reached its desired value of 2 a number of trials ago)
note* currently I have all values of objects in dict set to 1 for quicker testing.
note* works fine in psychopy builder
do you know whats going wrong? All of that seems complicated but I think its just something to do with skipThisTrial
Any help you have will be very much appreciated!