# Why does the engine think this is an infinite loop despite there being a while(!=) condition?

**URL:** <https://forums.unrealengine.com/t/why-does-the-engine-think-this-is-an-infinite-loop-despite-there-being-a-while-condition/476601>\
**Category:** Audio\
**Tags:** error, while-loop, unreal-engine, loop, question\
**Created:** [December 31, 2020, 9:57am UTC](https://forums.unrealengine.com/t/why-does-the-engine-think-this-is-an-infinite-loop-despite-there-being-a-while-condition/476601 "2020-12-31T09:57:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chrstph3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chrstph3r](https://forums.unrealengine.com/u/Chrstph3r)\
**Post date:** [December 31, 2020, 9:57am UTC](https://forums.unrealengine.com/t/why-does-the-engine-think-this-is-an-infinite-loop-despite-there-being-a-while-condition/476601/1 "2020-12-31T09:57:36Z")

</div>

Doing testing with a simple play montage and then revert back to original anim bp

This SHOULD in theory work but maybe im using the wrong nodes for grabbing the IsStopped bool from the montage

If I use the play animation montage node instead of override animation it doesnt even let me play before giving me an infinite loop error

 ![325986-anim.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/e/80e1232757ee5ca3978eec15e9db8ac01f20acc2.png)

Is this just a bug with the engine?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 31, 2020, 12:18pm UTC](https://forums.unrealengine.com/t/why-does-the-engine-think-this-is-an-infinite-loop-despite-there-being-a-while-condition/476601/2 "2020-12-31T12:18:43Z")

</div>

The delay has no effect in a while loop, so you’re effectively running at full tilt there…

You’d be better off using the timer I see there. All it’s doing at the moment is adding a 3 second delay.

Something like this ( cut down version ):

 ![325989-screenshot-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/8/828cfcdb2fdedf90960c05bba975af94c9c44205.jpeg)
