Trial Counter - Loop Issue

OS : Mac OS 10.15.6
PsychoPy version : StandalonePsychoPy-2021.2.3-macOS
Standard Standalone? (y/n) y
What are you trying to achieve?:
I am trying to create a textbook that shows how many “tickets” someone has out of the 40 trials, but I am coming across this problem: it shows out of 9 trials (presumably because it is only showing the “trials” loop which has 9 conditions/trials). “trials1” has an nReps of 4 and “trial_4” has an nReps of 1. So ultimately there are 36 “trials” and 4 “trial_4” for a total of 40 trials. How can I adjust my textbox below to reflect that:

What did you try to make it work?:

'Tickets: ’ +str(trials1.thisN) + “/” + str(trials.nTotal)

What specifically went wrong when you tried that?:
It shows (0/9) instead of (0/40)

Is there a reason you can’t use a custom counter?

  1. Add a code component to your reward routine
  2. in the Begin experiment tab set nTickets = 0
  3. in the Begin routine tab use nTickets += 1
  4. in your text use `$'Tickets: ’ + str(nTickets) + ‘/40’

Thank you, Becca!