Hi,
I have a simple experiment with four identical loops of 12 trials, with only one routine per loop which was copied/pasted so identical for the four loops. I’d like to show a counter in a text that says " 1 out of 12", where the first number updates for each trial.
So far I have created a code component with
trialN = 0
in Begin experiment and
trialN +=1
in Begin routine.
In the text component I have $str(trialN) + ' out of 12'
That works except that it keeps adding up in the 2nd, 3rd and 4th loop so that I get 13 out of 12, 14 out of 12 etc.
How can I make it reset to 1 at the beginning of each loop, ideally without having to re-create a different routine in each loop?
Thank you!