Announcement

Collapse
No announcement yet.

Trying to create 3D grid with For Loops

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Trying to create 3D grid with For Loops

    I'm trying to create a simple 3D grid array like so:



    'Grid Size Z' is set to 10, and 'Cube Size' is 100.

    The array works perfectly when "Grid Size XY" is set to 10 or 100. The final index is 109999, and the vector is [X=990, Y=990, Z=100].

    But if I set "Grid Size XY" to 1000 the last index reads "249749" and the vector is [X=7490 Y=2490 Z=0].


    Have I overlooked something in the way I've set things up? Any insight would be greatly appreciated!
    Last edited by Kibblesticks; 02-10-2017, 01:56 PM.

    #2
    Blueprints have a built in max iteration count. My guess would be that you've run into that. The default is 1.000.000 but it's not per node but per blueprint.

    Because it's such a great explanation let me quote the answerhub:

    Go into Edit>Project Settings>General Settings>Blueprints>Maximum Loop Iteration Count

    That sets the number of iterations you can run before it calls the infinite loop, and the max is ~2Billion.

    Note that this is iterations, which I believe is just about anything that happens inside an execution such as Get, Math, etc.

    Anyway, 20^6 is about 64 million, so you should be able to run that with a limit of 2 billion assuming you keep the actions inside the loop to less than ~30 iterations per execution and also do nothing else in the entire blueprint. If you need more than that you are going to need to find a way to split your loop up or download Rama's Victory Plugin which has a node that can break the limit counter mid-stream.
    Source:
    https://answers.unrealengine.com/que...-detected.html

    Swing by and upvote it, if this does solve your issue!

    Comment


      #3
      Ah brill, thanks Erasio!

      Comment

      Working...
      X