Simply set a boolean to true when it is pressed using button related events,
then in the tick function start accumulating the delta time of the tick function if the boolean you have is true.
when the release branch of the key event is called set the boolean to false and reset the timer you are accumulating the delta time in.
Instead of K, use the button you want.
how to get time of a button is being held down if button is not release.
getting time continuously while button is press, not after release.
Basically you need to use get input key time down. Watch this tutorial, it is what you are looking for i believe. WTF Is? Get Input Key Time Down in Unreal Engine 4 ( UE4 ) - YouTube
That’s a cool node, thx!
I did this for a test and it works also, but doing the substraction at every tick is maybe not the best way
Well i guess you could use something else instead of event tick, like a timer or a timeline.
you can access your counter variable continuously. and you are free not to reset it.