How Do I Make Nested For Loops with Delay Work?

Without delay, everything works perfectly, however with delay node added, the nested for loops loop only once. How do I make them work the way I desired without altering the internal workings of for loops? Which is to spawn a group of actor while each one`s creation is slightly delayed after the one before?

If you simply use your loops to add to an array of information that your spawning actors need (If it’s just transform, then save an array of transforms, but if it’s more you need to make multiple arrays, or a custom struct with all of the data you need per actor spawn)

On complete of the outer-most (Top of your list) loop, start a timer (looping with a time of 0.2).

Using this you should check if element 0 is valid, and if it is, spawn actor and pass in the relevant information.
Remember to remove that element from the array when you’re finished with it

This way you can spawn the correct amount of actors in order, with the relevant data, with a delay.

This is probably because you are going to be hitting that delay node several times in the same frame and the current for loops aren’t built for allowing for the delay>

There is a post here with several solutions available:

Thank you. That has been very helpful.

Thank you. That has been very helpful.