Repeating the Practice Phase based on Accuracy %
Hello,
I'm a rather new user to OpenSesame and coding more generally, so apologies if this question has an obvious answer.
Right now I'm trying to get my experiment to rerun the practice phase if the participants' accuracy falls below 85%. I read a similar past discussion which included this code below (which had worked for them):
if var.acc <= 85:
exp.items["block_loop_practice"].prepare()
exp.items["block_loop_practice"].run()
elif var.acc > 85:
exp.items["block_loop_experiment"].prepare()
exp.items["block_loop_experiment"].run()
I've tried this in an in-line script (in the prepare page... not sure if parts of it need to be in the run page?) following a feedback item (at the end of a trial sequence). The debug window keeps saying that the var "acc" does not exist, but I know for a fact it does.
Anything I'm missing?
Thanks,
Dominique
Comments
Update:
I moved the script to the "Run" page. Now the issue is that the feedback gets called after the 1st trial and then moves immediately into the experimental phase. How can I get it to show after the entire practice block is finished?
Nevermind. It's fixed...