What is the proper way to set up a loop for an event?

I am setting up a recharge system.
What is the best way to go about looping that event until it reaches its maximum?
For example: Shield(INT) is down to 0 it then knows to add 10 very second until it reaches 100 then stops.
I have it setup but it only fires once. Which loop command would I use?

A while loop. While the value is below 100 it increments. The input is a bool so you can use flow control nodes to check if its true that it’s still below 100.

I set this up in Blueprint a couple days ago. This uses a boolean to track whether the player’s shields can recharge, based on the time since they last took damage (the Retriggerable Delay event takes place after damage is calculated - this is important).

ForLoopWithDelayAndBreak is a custom macro based on the ForLoopWithBreak built-in function, but with a delay added after each iteration is complete. There’s probably way to do this in realtime with deltaSeconds. There are some tutorials out there for building macros - they’re very useful and pretty simple, especially here.

In this case, I’d recommend a while loop. I only used a for loop since I’m in the middle of prototyping and didn’t want to spend the extra time on cleanup. The important part is the break, so it will immediately stop recharging and reset the delay when taking damage, or when shields are at full.

I could see where yours would work but since I have mine setup differently, I haven’t been able to get it to work properly. I will use this as a reference. Thank you