How to change parameters based on time spent running?

I want to change character’s max speed by intervals after the character spent a while running. First I thought on using event on tick with a timer like this:

But then I remembered that one should avoid using on tick and use events instead, however I can’t find an event based on the change of the boolean “is running” or “is moving on ground”.

Are there any event like this? Or should I do this with C++? I searched in the brain component and nav movement component, but I couldn’t find where do those variables change in the source code either.

Should I try to implent this another way?

Hey, when pressing your sprint key, you can SetTimerByEvent, that will then modify the max walk speed after the specified delay. When releasing the sprint key, you can cancel the timer :

(You can also modify “IncreaseWalkSpeed” event to run a timeline or something to modify speed over time)

A small load on tick is fine, it’s the unbelievable tonne weights that some people put there that’s not.

I think this is the same as the old stamina nutshell:

( Untested: something like that )

:slight_smile:

( It should connect back )

338486-screenshot-2.jpg

Thank for the answer, I think I can do something with it, but what if I need to do something else when “is running” or “is walking on ground” change their value?

I have a sprint mechanic but it’s different from the mechanic that the question is about.