Hey! Very new to Unreal, working through the blueprints to get a good handle on things. I’m currently working on Character Movement, worked through the tutorial in the documentation, and now I’m trying to build on it for some exercise.
I’m attempting to make the player character have a “second tier” of sprint. Basically, after sprinting for a set period of time, I’d like them to speed up more, similar to a Metroid-style booster (not a gradual acceleration, but an all-at-once increase in speed). My question is: What kind of node would I use to make that happen? Or if there are multiple that could work, what would they be?
try to write it out with very basic logic like this:
While sprinting…
measure a certain amount of time
if that amount of time has passed, increase my sprint speed by X
If stop sprinting before the time threshold is reached, what do I do? Reset the timer? Another timer to measure cooldown before resetting?
There isn’t a node that magically does whatever you want, but you can code something like this using simple logic, a few variables, some branch nodes, and possibly a timer node. But no point showing example code if you haven’t worked out exactly how you want it to work. Like do you want to gradually increase the speed? Or suddenly? etc. The little details matter.
Appreciate the response. I actually ended up figuring it out.
For clarification, I wanted a sudden increase in speed, which I ended up doing with a Function that just set the max walk speed higher than the max walk speed set for the sprint, then with set timer by function name.
Very rudimentary, but it achieved what I wanted to test.