# Conditional loop problem

**URL:** <https://discourse.psychopy.org/t/conditional-loop-problem/6686>\
**Category:** Coding\
**Created:** [February 14, 2019, 3:45pm UTC](https://discourse.psychopy.org/t/conditional-loop-problem/6686 "2019-02-14T15:45:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sambi](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sambi](https://discourse.psychopy.org/u/Sambi)\
**Post date:** [February 14, 2019, 3:45pm UTC](https://discourse.psychopy.org/t/conditional-loop-problem/6686/1 "2019-02-14T15:45:12Z")

</div>

**OS** (e.g. Win10):  
**PsychoPy version** (e.g. 1.84.x):  
**Standard Standalone? (y/n)** If not then what?:yes  
**What are you trying to achieve?:** I am trying to make a flicker paradigm exepriments (two images separated by a mask). The loop of the image-blank-image is supposed to go on until the participant presses the spacebar (and record reaction time). For some reason, no matter what I do the routine doesn’t end with the key being pressed, nor does it go on forever… it just flickers for a few seconds and then proceeds to the next loop.

**What did you try to make it work?:**  
I ticked the ‘force the end of routine’ box, and put spacebar as an allowed key. I haven’t used psychopy before (or program anything really) so I have no idea how to put it in code. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/michael/32/16_2.png) [@Michael](https://discourse.psychopy.org/u/Michael)\
**Post date:** [February 15, 2019, 5:52am UTC](https://discourse.psychopy.org/t/conditional-loop-problem/6686/2 "2019-02-15T05:52:55Z")

</div>

You need to show us more detail of how you are trying to implement this (e.g. screenshots of your flow panel and of any relevant component settings).

It’s always a good idea to consider “could a person give useable feedback on this question, knowing nothing other than the information I have provided”?
