Where is the infinite loop here (While loop)?

Hi , I’m trying to set up this loop that runs for 25 seconds after the “Enter” key is pressed. I must be missing something because I’m getting an infinite loop error… Here is my blueprint:

As you can see, the loop is supposed to break when the current time passes 25 seconds after the start time. But when I hit the “Enter” key, Unreal gives me an ‘infinite loop detected’ message and shows me this screen:

I’m stumped! Any ideas would be really appreciated, thanks!

The while loop will block the entire program until its condition is true.

I suggest you rewrite this and implement an event by timer instead.

2 Likes

Thank you! The timer implementation helped.

1 Like