# \#while-loop

**URL:** https://forums.unrealengine.com/tag/while-loop/4923.md

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

---

## [Change wheel radius on run time](https://forums.unrealengine.com/t/change-wheel-radius-on-run-time/1211681)

<div class="topic-metadata">

**Author:** [@Magarioo450](https://forums.unrealengine.com/u/Magarioo450)\
**Replies:** 0\
**Last updated:** [June 27, 2023, 1:22am UTC](https://forums.unrealengine.com/t/change-wheel-radius-on-run-time/1211681 "2023-06-27T01:22:49Z")

</div>

Hello, I trying create a car assembly like my summer car but I dont know how I can change Wheel radios on run time I using Chaos system from unreal engine and I can´t find a way to get this wheels class to change…

---

## [Why does the engine think this is an infinite loop despite there being a while(!=) condition?](https://forums.unrealengine.com/t/why-does-the-engine-think-this-is-an-infinite-loop-despite-there-being-a-while-condition/476601)

<div class="topic-metadata">

**Author:** [@Chrstph3r](https://forums.unrealengine.com/u/Chrstph3r)\
**Replies:** 1\
**Last updated:** [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 "2020-12-31T12:18:43Z")

</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 animati…

---

## [Infinite While Loops](https://forums.unrealengine.com/t/infinite-while-loops/473051)

<div class="topic-metadata">

**Author:** [@MTBRGaming](https://forums.unrealengine.com/u/MTBRGaming)\
**Replies:** 3\
**Last updated:** [October 17, 2020, 6:31pm UTC](https://forums.unrealengine.com/t/infinite-while-loops/473051 "2020-10-17T18:31:13Z")

</div>

I have looked at some of the other questions about infinite while loops and they all just say to not use a while loops because you can do something else. I am making a game where you can slam down on the ground and when …

---

## [While loopが機能しません。](https://forums.unrealengine.com/t/while-loop/471169)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_0975e843](https://forums.unrealengine.com/u/anonymous_user_0975e843)\
**Replies:** 3\
**Last updated:** [September 15, 2020, 1:07am UTC](https://forums.unrealengine.com/t/while-loop/471169 "2020-09-15T01:07:30Z")

</div>

現在のfovがスプリント時仕様のfovになるまで繰り返す（上の画像ではhelloと出力）処理をさせたかったのですがwhile loopから信号が出ません。エラーもないです。 while loopの条件がいけないのかと思い、print stringで確認しましたが（下のブループリントで） trueと出たのでそれは問題なし。上のブランチからの信号も確認しましたが 問題なく出ています。どなたか原因わかる人いたらぜひ回答…

---

## [WhileLoopノードの中身を教えてください](https://forums.unrealengine.com/t/whileloop/471274)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_0975e843](https://forums.unrealengine.com/u/anonymous_user_0975e843)\
**Replies:** 2\
**Last updated:** [September 15, 2020, 12:54am UTC](https://forums.unrealengine.com/t/whileloop/471274 "2020-09-15T00:54:52Z")

</div>

ue4勉強中の初心者です。 StandardMacros（初期状態から入っているマクロライブラリ？）のWhileLoopの中身をいじって空にしていました。おそらくエラーメッセージからとんで消してしまったからだと思います、バカでした…SSだけでも結構です、WhileLoopの中身を教えていただきたいです。

---

## [For Each loop causing infinite loop?](https://forums.unrealengine.com/t/for-each-loop-causing-infinite-loop/465691)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_0efb4f1d](https://forums.unrealengine.com/u/anonymous_user_0efb4f1d)\
**Replies:** 1\
**Last updated:** [May 24, 2020, 7:55am UTC](https://forums.unrealengine.com/t/for-each-loop-causing-infinite-loop/465691 "2020-05-24T07:55:29Z")

</div>

Hi all, I am having a relatively straightforward problem. I am running a while loop with nested for each loops. The while loop is dependent on the number of iterations of these for each loops. Appending to these for eac…

---

## [While loop bug?](https://forums.unrealengine.com/t/while-loop-bug/462590)

<div class="topic-metadata">

**Author:** [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Replies:** 4\
**Last updated:** [March 19, 2020, 10:29am UTC](https://forums.unrealengine.com/t/while-loop-bug/462590 "2020-03-19T10:29:28Z")

</div>

I spent quite a long time finding this. Code: Output: That can’t be right?..

---

## [Why does this while loop give me an error?](https://forums.unrealengine.com/t/why-does-this-while-loop-give-me-an-error/459485)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_fd83f0461](https://forums.unrealengine.com/u/anonymous_user_fd83f0461)\
**Replies:** 13\
**Last updated:** [December 13, 2019, 8:39pm UTC](https://forums.unrealengine.com/t/why-does-this-while-loop-give-me-an-error/459485 "2019-12-13T20:39:35Z")

</div>

First thing to do: Break it apart, play with the first comment, then second etc. Work out when you hook up, the error occurs. And what are you trying to do, as there may be an easier way to do it and someone may have a…

---

## [Non Infinite While Loop](https://forums.unrealengine.com/t/non-infinite-while-loop/457292)

<div class="topic-metadata">

**Author:** [@Rymazon](https://forums.unrealengine.com/u/Rymazon)\
**Replies:** 4\
**Last updated:** [October 22, 2019, 5:55am UTC](https://forums.unrealengine.com/t/non-infinite-while-loop/457292 "2019-10-22T05:55:10Z")

</div>

This is probably a dumb question but I am not sure of the correct way to do this. I have a while loop that is set to repeat until a variable is changed. When it is called, it crashes because it detected an infinite loop.…

---

## [Infite Loop on Multiplayer](https://forums.unrealengine.com/t/infite-loop-on-multiplayer/453080)

<div class="topic-metadata">

**Author:** [@XFran1998X](https://forums.unrealengine.com/u/XFran1998X)\
**Replies:** 8\
**Last updated:** [July 31, 2019, 1:48pm UTC](https://forums.unrealengine.com/t/infite-loop-on-multiplayer/453080 "2019-07-31T13:48:37Z")

</div>

First of all, sorry for my English im still learning it ^^ Im making some machanics I did on single player to multiplayer (dedicated server), i have a special problem with one mechanic: When a player falls and overlap …

---

## [\[Feature Request\] Material editor loops](https://forums.unrealengine.com/t/feature-request-material-editor-loops/366633)

<div class="topic-metadata">

**Author:** [@SFtheWolf](https://forums.unrealengine.com/u/SFtheWolf)\
**Replies:** 13\
**Last updated:** [October 22, 2018, 11:30pm UTC](https://forums.unrealengine.com/t/feature-request-material-editor-loops/366633 "2018-10-22T23:30:42Z")

</div>

I’ve seen this discussed a lot but I’m surprised I couldn’t find a formal request. It’d be extremely useful to have while and for loops in the form of native material editor nodes. It would eliminate the need for custom …

---

## [Help me fix this While Loop?](https://forums.unrealengine.com/t/help-me-fix-this-while-loop/434432)

<div class="topic-metadata">

**Author:** [@AyyKenny](https://forums.unrealengine.com/u/AyyKenny)\
**Replies:** 3\
**Last updated:** [October 3, 2018, 8:19pm UTC](https://forums.unrealengine.com/t/help-me-fix-this-while-loop/434432 "2018-10-03T20:19:58Z")

</div>

I’m trying to run a loop while the character is in the air that ends when the player stops falling. This compiles fine but the game recognizes it as an infinite loop. I’m not a coder so I’m having trouble with figuring…

---

## [What's wrong with this while loop??](https://forums.unrealengine.com/t/whats-wrong-with-this-while-loop/420313)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_9014a006](https://forums.unrealengine.com/u/anonymous_user_9014a006)\
**Replies:** 2\
**Last updated:** [March 20, 2018, 4:42am UTC](https://forums.unrealengine.com/t/whats-wrong-with-this-while-loop/420313 "2018-03-20T04:42:08Z")

</div>

Nvm check your array sizes and conditionals everyone

---

## [How to make a while loop with key presses](https://forums.unrealengine.com/t/how-to-make-a-while-loop-with-key-presses/317518)

<div class="topic-metadata">

**Author:** [@Tolli](https://forums.unrealengine.com/u/Tolli)\
**Replies:** 21\
**Last updated:** [January 31, 2018, 1:39am UTC](https://forums.unrealengine.com/t/how-to-make-a-while-loop-with-key-presses/317518 "2018-01-31T01:39:51Z")

</div>

I don’t have a lot of so hopefully someone jumps on this quick. I need to stay in this while loop as long as one of the arrow keys aren’t pressed and when they are it needs to run the compare checks than exit. I’m not r…

---

## [While loop problem](https://forums.unrealengine.com/t/while-loop-problem/411993)

<div class="topic-metadata">

**Author:** [@Nagy93](https://forums.unrealengine.com/u/Nagy93)\
**Replies:** 2\
**Last updated:** [December 12, 2017, 9:17am UTC](https://forums.unrealengine.com/t/while-loop-problem/411993 "2017-12-12T09:17:57Z")

</div>

Hi everyone, i need your help because i am stuck on this problems. In this blueprint i am working on the enemies damaging the player.So on when the enemies overlap it damage the player once and then it keep damaging unt…

---

## [Wrong infinite loop?](https://forums.unrealengine.com/t/wrong-infinite-loop/408998)

<div class="topic-metadata">

**Author:** [@devoluti0n](https://forums.unrealengine.com/u/devoluti0n)\
**Replies:** 3\
**Last updated:** [November 10, 2017, 12:27am UTC](https://forums.unrealengine.com/t/wrong-infinite-loop/408998 "2017-11-10T00:27:04Z")

</div>

Hi, Been searching a bit on the forums but i just wanted to know if either my logic, or the infinite loop treshold is wrong? Basically i want to force my player to move until he reached a certain point so i’m doing so…

---

## [Play audio on loop while animation sequence is active?](https://forums.unrealengine.com/t/play-audio-on-loop-while-animation-sequence-is-active/406321)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_99dcdf401](https://forums.unrealengine.com/u/anonymous_user_99dcdf401)\
**Replies:** 0\
**Last updated:** [October 6, 2017, 10:48am UTC](https://forums.unrealengine.com/t/play-audio-on-loop-while-animation-sequence-is-active/406321 "2017-10-06T10:48:15Z")

</div>

Hello Everyone, I’m trying to activate a sound file I have set to ‘looping’ so it is always active when an level animation sequence is activated. I am using the ‘isPlaying’ node for the Boolean condition for the while l…

---

## [Is while loop is cheaper than for loop?](https://forums.unrealengine.com/t/is-while-loop-is-cheaper-than-for-loop/404387)

<div class="topic-metadata">

**Author:** [@Tokodboy](https://forums.unrealengine.com/u/Tokodboy)\
**Replies:** 4\
**Last updated:** [September 13, 2017, 6:38am UTC](https://forums.unrealengine.com/t/is-while-loop-is-cheaper-than-for-loop/404387 "2017-09-13T06:38:53Z")

</div>

I read that for loop is an expensive operation because Loop iterations will take place between frames, so large loops may incur a performance hit. But what the matter with the While Loop? It is faster/cheaper then for? …

---

## [ForeEachLoop Crashing the game :( I don't understand why](https://forums.unrealengine.com/t/foreeachloop-crashing-the-game-i-dont-understand-why/392945)

<div class="topic-metadata">

**Author:** [@TheNomadNamedY](https://forums.unrealengine.com/u/TheNomadNamedY)\
**Replies:** 4\
**Last updated:** [May 7, 2017, 7:48am UTC](https://forums.unrealengine.com/t/foreeachloop-crashing-the-game-i-dont-understand-why/392945 "2017-05-07T07:48:03Z")

</div>

I have a grid of tiles and an array of them that is made using the “get all of class” node. BEcause of this, the array is random. I’m trying to sort the array by name (into a new array that is) but i’m getting a callstac…

---

## [While loop to infinity and beyond](https://forums.unrealengine.com/t/while-loop-to-infinity-and-beyond/386137)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_5b57b2ed1](https://forums.unrealengine.com/u/anonymous_user_5b57b2ed1)\
**Replies:** 5\
**Last updated:** [February 25, 2017, 2:01pm UTC](https://forums.unrealengine.com/t/while-loop-to-infinity-and-beyond/386137 "2017-02-25T14:01:33Z")

</div>

Hello the community. I get a feel of why it doesn’t work, but i can’t see how to make it work. So I want to send the player’s character back to a starting position, using a while loop to fire the Add input movement unt…

---

## [Infinite while loop despite A\>B condition?](https://forums.unrealengine.com/t/infinite-while-loop-despite-a-b-condition/347274)

<div class="topic-metadata">

**Author:** [@ant1fact](https://forums.unrealengine.com/u/ant1fact)\
**Replies:** 9\
**Last updated:** [February 13, 2016, 8:39pm UTC](https://forums.unrealengine.com/t/infinite-while-loop-despite-a-b-condition/347274 "2016-02-13T20:39:48Z")

</div>

We made these platforms in class today that break after the time displayed above them. I wanted to take it a bit further and see if I can make that text act like a countdown once you step on a platform, decreasing in 0.1…

---

## [Delay and while loop don't cooperate well](https://forums.unrealengine.com/t/delay-and-while-loop-dont-cooperate-well/346193)

<div class="topic-metadata">

**Author:** [@te4zer](https://forums.unrealengine.com/u/te4zer)\
**Replies:** 2\
**Last updated:** [February 4, 2016, 1:28pm UTC](https://forums.unrealengine.com/t/delay-and-while-loop-dont-cooperate-well/346193 "2016-02-04T13:28:41Z")

</div>

This makes the whole engine instantly crash on usage

---

## [Run OnBeginOverlap more than once](https://forums.unrealengine.com/t/run-onbeginoverlap-more-than-once/339056)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Replies:** 2\
**Last updated:** [November 25, 2015, 2:29pm UTC](https://forums.unrealengine.com/t/run-onbeginoverlap-more-than-once/339056 "2015-11-25T14:29:47Z")

</div>

I am trying to devise a door that will work for my entire gameplay. This door will turn on a bool on my player which will allow me to fire a key. When I fire that key, If I am still in the collision, it will play the an…

---

## [While loop always infite?](https://forums.unrealengine.com/t/while-loop-always-infite/320835)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_5c86276a](https://forums.unrealengine.com/u/anonymous_user_5c86276a)\
**Replies:** 1\
**Last updated:** [June 6, 2015, 11:52am UTC](https://forums.unrealengine.com/t/while-loop-always-infite/320835 "2015-06-06T11:52:53Z")

</div>

Hey guys, for some reason my while-loop is infite and I can’t figure out why :confused: Help would be apprechiated,

---

## [How to enter a while loop?](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027)

<div class="topic-metadata">

**Author:** [@Nclz\_1](https://forums.unrealengine.com/u/Nclz_1)\
**Replies:** 7\
**Last updated:** [January 26, 2015, 2:44pm UTC](https://forums.unrealengine.com/t/how-to-enter-a-while-loop/305027 "2015-01-26T14:44:03Z")

</div>

Hello :slight\_smile: 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 l…

---

## [How to make a variable change loop from a min and max?](https://forums.unrealengine.com/t/how-to-make-a-variable-change-loop-from-a-min-and-max/301616)

<div class="topic-metadata">

**Author:** [@konker777](https://forums.unrealengine.com/u/konker777)\
**Replies:** 3\
**Last updated:** [December 15, 2014, 8:49am UTC](https://forums.unrealengine.com/t/how-to-make-a-variable-change-loop-from-a-min-and-max/301616 "2014-12-15T08:49:19Z")

</div>

Why not use another variable and simply increase it each tick by a value times delta time (so different fps won’t affect this effect). You can clamp the value right before the usage which would set the limits you want. …

---

## [Update Skylight](https://forums.unrealengine.com/t/update-skylight/295425)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_416b781b](https://forums.unrealengine.com/u/anonymous_user_416b781b)\
**Replies:** 4\
**Last updated:** [October 6, 2014, 6:19pm UTC](https://forums.unrealengine.com/t/update-skylight/295425 "2014-10-06T18:19:26Z")

</div>

Hello, I’m new to UE4 and enjoy it very much. I want to update the skylight in my Level Blueprint, as I haven’t found another option to change the variables of the skylight. Useing Event Tick would result in a remarkabl…

---

## [Why do my while loops crash the game?](https://forums.unrealengine.com/t/why-do-my-while-loops-crash-the-game/288535)

<div class="topic-metadata">

**Author:** [@Unisink2020](https://forums.unrealengine.com/u/Unisink2020)\
**Replies:** 2\
**Last updated:** [July 18, 2014, 4:05am UTC](https://forums.unrealengine.com/t/why-do-my-while-loops-crash-the-game/288535 "2014-07-18T04:05:49Z")

</div>

I know why while loops will crash an application. What I don’t get is why MY while loops crash the game, no matter how “correct” I set the condition. Here is an example. According to this blueprint, when I hold down the …
