hi guys so i have my sprint mechanics set up and now im implementing my stamina system, but just wondering if there is a better way than using event tick??
You will be fine using Event Tick. What you should do instead though is subtract delta seconds, rather than subtracting 1, otherwise players will be able to have their stamina last longer with a lower framerate.
Delta Time is seconds passed in game. Event tick is called every frame, which will vary based on game play and the users computer specs.
I also would not use timelines at all.
You could put it in the movement input. For example, if shift is down and you are updating movement in the forward direction, then drain stamina. This is a little more complex and shouldn’t make a big difference in performance. Event tick would be fine.
Another way is to put a delay before the stamina drain in the event tick. You will set the amount of stamina drained after each delay tho. This is more optimal.