OS Win11
PsychoPy version v2022.2.5
**Standard Standalone? y
I am using the builder. I have a break in blocks. I’d like to count the blocks and display as a message to participants how many blocks they’ve completed.
In a routine, I’ve added the following code in the ‘Before Experiment’ tab:
block_count = 0;
I’ve then added the following in the ‘Begin Routine’ tab:
block_count = block_count + 1;
if block_count == 1:
msg_1 = ‘You completed %.0f block out of 5.\n \n Take a short break. \n \n Press X when you are ready to continue.’%(block_count)
elif 1 < block_count >= 4:
msg_1 = ‘You completed %.0f blocksout of 5.\n \n Take a short break. \n \n Press X when you are ready to continue.’ %(block_count)
elif block_count ==5:
msg_1 = ‘You completed the experiment - well done! \n \n let the experimenter know you have finished’
in the text component I’ve added ‘$msg_1’.
The block_count doesn’t seem to count and I only ever get the message for “if block_count == 1”
Any help much appreciated.
Likely something small and stupid.
Thanks!