# Skipping 2 routines based on condition

**URL:** <https://discourse.psychopy.org/t/skipping-2-routines-based-on-condition/22218>\
**Category:** Builder\
**Created:** [April 12, 2021, 7:54am UTC](https://discourse.psychopy.org/t/skipping-2-routines-based-on-condition/22218 "2021-04-12T07:54:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![psychisawesome](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@psychisawesome](https://discourse.psychopy.org/u/psychisawesome)\
**Post date:** [April 12, 2021, 7:54am UTC](https://discourse.psychopy.org/t/skipping-2-routines-based-on-condition/22218/1 "2021-04-12T07:54:37Z")

</div>

Hi all!!

I have a routine that has a practice trial and test trial. In the practice trial there are 24 trials split into 2 x 12 trials.

If the participant scores at lest 8 in the first 12 trials, it moves onto the test routine, else, the participant proceeds onto the 2nd 12 trials. If the participant does not score at least 8 in the 2nd 12 trials, it will skip the test routine. I have included the code as such in the Begin Routine tab of my test trial:(both the instruction and trial routine (i.e., “startGame” and 'trial2 (testLoop)" respectively)

```auto
if practiceLoop.thisTrialN == 11 and score <= 5:
   continueRoutine = False

```

However, this logic does not work and the participant still moves onto the test round instead of proceeding onto the next routine if they fail the 2nd 12 trials.

I have included the flow of my experiment here for better understanding.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/f/4/f4a9f0dc19fa4e87d965be0743aa2295ac01a814.png)

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [April 12, 2021, 8:21am UTC](https://discourse.psychopy.org/t/skipping-2-routines-based-on-condition/22218/2 "2021-04-12T08:21:41Z")

</div>

> [@Routine does not continue](https://discourse.psychopy.org/t/routine-does-not-continue/22211/2):
>
> How about the following in Begin Routine if practiceLoop.thisTrialN == 11: if score \> 5: practiceLoop.finished=True continueRoutine = False else: continueRoutine=False
