I’ve searched on youtube to see what way people got this to work for then, but they all rely on the Event Tick which won’t work for me, so I guess my question is, does anyone have another angle I could go with? My knowledge of BP’s and programming in general are still noobish so bear with me
while loop in BP are designed for quick executions like searching in a array, it can’t be easily delayed.
but there is a “set timer by event”, the timer can be reset, and it calls a function when the timer ends
Unfortunately I am currently unable to take screenshots as I don’t have UE4 on this computer otherwise they would be here. Despite this I will endeavor to give an adequate answer. So here goes:
Connect your custom event to a Sequence.
Create a Gate and make sure Start Closed is ticked.
Connect the Then 0 to Open on the Gate and connect Then 1 to Enter on the gate.
Add another Sequence to the right of the Gate and connect it to Exit on the Gate.
Connect the Then 0 to your SET AI Health Value.
Connect Then 1 to a Retriggerable Delay with Duration as Heath Regen Rate.
Connect the completed pip of Retriggerable Delay to a Branch.
Connect your AI Health Value < Max Health as the Condition to Branch.
Connect True of the Branch to Enter and connect False to Close.