Hello,
I need to repeat trials when participants don’t respond or respond with a key that isn’t allowed. My trials are in a spreadsheet in the Prac_Loop. And Control_Prac sends participants back to the start if they don’t reach 70% accuracy. Everything I’ve tried either crashes if there’s a wrong/ no response or doesn’t repeat the trial if it’s not an allowed response.
From the forum it seems like it could be because its a nested loop - but I need it to keep running until they get over 70 - so not sure how it would work without that. I also tried it on just a loop (not nested and it didn’t work). I’ve tried a few code snippets for example one being.
begin routine:
repeat_trial = True
repeat_count = 0
max_repeats = 1000
each frame - I have a slider which increases for how long the button is pressed.
if slider.getRating() is not None:
repeat_trial = False
End routine:
if repeat_trial:
repeat_count += 1
if repeat_count >= max_repeats:
print(“Trial repeated too many times. Moving on.”)
repeat_trial = False
else:
continueRoutine = False