Delay in the MIDDLE of a for loop

SO I HAVE BUMPED INTO A HURDLE

I want to execute a for loop with a delay, which isnt apparently possible by default. I know I could make a new macro, but here is a problem: I dont want the delay be at the beginning or ending of the loop body - but in the middle of it.

AS in

For each item in array
{
//execute some code
Delay 5 seconds
//execute some code
}

How can I do this?

Blueprints preferred, but if C++ is needed to solve this, I will welcome a C++ solution

1 Like

I’m pretty sure you can do that with a macro

image

But… It will not wait until ‘part 1’ is done before executing the delay, and it will not wait until ‘part 2’ is done before running the next index.

If you want it to wait for everything, then you just have to make a manual loop

I ended up doing just that :slight_smile: Thank you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.