In my AI code, I want the AI to work until the food container is full, sleep until endurance is restored, etc., and I have a C++ method which will update variables in the actor based on x production per second. If I were doing this in a blueprint, I would use the Tick event. I’m not having any luck finding something comparable to delta time for coroutines. I see Actor.Tick(real Delta_Seconds), but I didn’t want to put any calls to the SK AI code into the tick event unless that’s my only choice.
I guess I could use Actor.game_time_since_creation to get the before and after times to create a delta. Is that the best way to accumulate time for sections of code in coroutines and methods?
Here’s a basic example: