# How to enter a while loop?

**URL:** <https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027>\
**Category:** Audio\
**Tags:** while-loop, infinite-loop, unreal-engine, loop, question, Blueprint\
**Created:** [January 26, 2015, 2:14pm UTC](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027 "2015-01-26T14:14:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nclz\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nclz\_1](https://forums.unrealengine.com/u/Nclz_1)\
**Post date:** [January 26, 2015, 2:14pm UTC](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027/1 "2015-01-26T14:14:55Z")

</div>

Hello 🙂

I’ve got a problem with entering my while loop. No matter what bolean variable… either it’s not entering or it’s entering an infinite loop…  
and I’ve already set my bool variable at the and of the loop… ☹

thanks in advance

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [January 26, 2015, 2:22pm UTC](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027/2 "2015-01-26T14:22:07Z")

</div>

For what you need that loop? Is it something that happens in span of more then one frame?

---

<div class="post-metadata">

**Author:** ![Nclz\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nclz\_1](https://forums.unrealengine.com/u/Nclz_1)\
**Post date:** [January 26, 2015, 2:27pm UTC](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027/3 "2015-01-26T14:27:47Z")

</div>

![27953-loop2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/c/16c0c317db72924bb73258df7589edfcd4da28a9.png)

---

<div class="post-metadata">

**Author:** ![Nclz\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nclz\_1](https://forums.unrealengine.com/u/Nclz_1)\
**Post date:** [January 26, 2015, 2:28pm UTC](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027/4 "2015-01-26T14:28:45Z")

</div>

I need to get the location of both footbones so I can set a jumpfoot

---

<div class="post-metadata">

**Author:** ![Nclz\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nclz\_1](https://forums.unrealengine.com/u/Nclz_1)\
**Post date:** [January 26, 2015, 2:32pm UTC](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027/5 "2015-01-26T14:32:22Z")

</div>

here’s something like a pseudo code:

if the position of the right takeoff leg is in front of the root  
then set right takeoff leg true

* * *

so it plays the animation sequence where the right leg is the takeoff leg

---

<div class="post-metadata">

**Author:** ![Nclz\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nclz\_1](https://forums.unrealengine.com/u/Nclz_1)\
**Post date:** [January 26, 2015, 2:34pm UTC](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027/6 "2015-01-26T14:34:47Z")

</div>

and there is a point where either the right nor the left leg could be the takeoff leg that ist why I want to use a while loop

---

<div class="post-metadata">

**Author:** ![Nclz\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nclz\_1](https://forums.unrealengine.com/u/Nclz_1)\
**Post date:** [January 26, 2015, 2:42pm UTC](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027/7 "2015-01-26T14:42:50Z")

</div>

Here’s the point I’ve mentioned

![27954-area.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/2/af207277adcfc73345cc3973c9d6a5972c8b8743.png)

---

<div class="post-metadata">

**Author:** ![Nclz\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nclz\_1](https://forums.unrealengine.com/u/Nclz_1)\
**Post date:** [January 26, 2015, 2:44pm UTC](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027/8 "2015-01-26T14:44:03Z")

</div>

so you can see the foot is nearly true, but at that position both feet are false
