Why am I getting infinite loops?
I am trying to do some cave generation but for some reason whenever I run these blueprints I get an infinite loop in each one.
In the above I get an infinite loop in the second for each loop even though it's not doing anything at the moment. I have checked the startY and endY values and startY is always less than endY.
In the above I get an infinite loop in the ForEachLoop but when I disconnect the loop from the switch statement I no longer get an infinite loop.
asked Sep 25 '15 at 06:13 AM in Blueprint Scripting
Infinite loop can happen due to the time it takes as well and not necessarily the issue of the code. there is a maximum number of statement per loop supported for UE4 blueprints. check this thread https://answers.unrealengine.com/questions/24788/how-to-bypass-the-loop-limit.html
although the best solution is to write large codes in C++ and make a function blueprint for them
answered Sep 25 '15 at 02:03 PM
You might be running into the Blueprint Loop limit. Although this defaults to 1000000, which should be enough for most cases, nested loops can cause you to reach the limit anyway.
You can increase the limit in the Project Settings > Engine: General Settings > Blueprints.
answered Sep 25 '15 at 09:17 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here