Download

For Loop + Delay problem

Can someone please explain why this setup is not working? I expected to have printed 6 hellos in 1.2 seconds


I can rout it in different ways and make it work but as I look this should work too

My guess is that the For Loop node doesn’t wait for the Loop Body to finish executing before the next loop. I think you should use timers instead of the For Loop and Delay node (such as the Set Timer by Event node)

1 Like

If you absolutely need to have a delay in a loop you can do it with a macro library function.

Macro needs to be of type Actor to get the delay node.

Forloop-delay-macro

3 Likes

Or this:

1 Like

I did this but it have no break, the post above you is giving me good idea I will do the same, but thanks for joining

Thats very nice!!! I will create it thank you

Just to add, depending on how you look at it the real reasons this isn’t working is this:

  1. Epic never created a Beginner FAQ highlighting ‘Top-10 Mistakes’ to avoid in BP
  2. Epic fail to write docs that contain catches-gotchas / edge-cases / assumptions
  3. Tutorial makers are too busy teaching all the wrong things just confusing people

Just be aware there’s another 10-20 gotchas just like this one for both BP & UE Editor!

Loads of Catches & Gotchas that only experience can resolve.

1 Like