So I have a very basic function that I’m calling at begin play to test this implementation. I am aiming to display a count from 0 to 29 on the screen in .5 second intervals using the GetWorldTimerManager()
When I PIE 29 is displayed on the screen at .5 second intervals but I’m not sure what to alter in order to get the count to start at 0 and go up to 29.
I know it has to be something super simple that I’m just overlooking. Thank you in advance for the help.
You’d need to set the timer handle just once (rather than 30 times), and then when PickedDelay is called, increment MyNumber there, and set the timer handle again if you haven’t hit whatever value you’re counting to.
I can’t seem to figure out how to keep the entire for loop from running, I apologize if you alluded to the solution but I changed my code to this and now it runs through the entire loop and then prints it all at once, waits .5 seconds, and then runs through the entire loop and prints it all again. Now granted, I getting the entire loop to print instead of just 29 - so I have that much at least. Is there something else I didn’t get?
Ah, getting rid of the for loop entirely worked. I just had to move ++MyNumber and the debug message into the conditional statement. Also, I found out that it works with out the second GetWorldTimeManager() call in the conditional.