ForLoop with Delay in UE4
Overview
Hi-hi!
If you tried to use loop with Delay node, you know that Delay doesn’t work. Or if you didn’t, in example below, instead of printing with 1 second delay, PrintString prints immediately.
How to “fix”
I’ll show how to “fix” it for ForLoop. In your blueprint where you need modified loop, create a ForLoop. Then open it by double click on it. UE4 will open another blueprint, named StandartMacros. Inside of it, you’ll see next:
Now open again your blueprint and create a new Macro with ForLoopWithDelay name.
Copy and set all the same, as in the original ForLoop from StandartMacros to your Macro. Then, most important, add Delay and connect its Duration param to Inputs, as in the pic below:
At this point you’ve done with modifing ForLoop. Let’s change the logic that was in beginning.
Keep in mind, that modified loop, works only inside blueprint, where its created.
Similarly with other loops. In StandartMacros you can find other loops. Copy them, create Macro and add Delay.
For example, While loop:
It’s a mirror from WebArchive