My sprint function isn’t a constant sprint, but more of a temporary speed boost that gradually decreases back to standard walking speed. Everything works like I want it to, but is there a better place to put this than the Event Tick in my Character BP? I prefer to not clutter the Tick with things that may be better placed somewhere else, but so far, this seems to be the best place I can think of. Where would YOU put it?
There are tools available to you to manage code density, such as collapsing to functions or graphs. Instead of having a large bunch of nodes hanging off of Tick, you can condense those into a function and simply have the function call node on Tick instead.
Tick rate executes every frame, you can actually quite easily create your own dummy Tick or SimulationTick using Timers. This is useful as you cannot control the simulation rate of Tick but you can control a Timer, by setting it to Loop and giving it a low Time parameter it can function the same as Tick.
Managing a Timer is the tricky part however, you would need to force it to stop prematurely if that type of event occurs as well as when your MaxWalkSpeed == BaseMovementRate, otherwise it will continue to execute.
In this instance, using Tick looks fine to me, but if you wanted more control over how often it updates, use a Timer.
Thanks for the input! I like the idea of using a timeline, and though I don’t know if I’ll end up going that route here, that does give me some ideas for other power ups/power downs to implement a little later. (Muhahahaha!)
I think in this particular case, I might stick to the Tick, but some good information and ideas here.