Why are all my actors spawning at once?

Here I have a for loop that spawns an actor for each vector in array with a 5 second delay at the end. Why are my actors spawning immediately one right after the other? This is started by a begin play event (not sure if that matters). There are no other spawn functions that can be triggering

Because Delay has no effect on ForEachLoop at all. The loop is a Macro, if you double-click it you’ll see what it does.
I won’t suggest editing a standard macro, though. Make an actual loop with delay in it.

2 Likes

Will this not error once the last index is reached? Or an infinite loop?

Just add a check after the index increment if the new value is greater than array length -1 if yes the stop there.

1 Like