Toggle sprint off when speed slows

The issue I’m having is I need the
event tick for something else […] I
feel like I must be missing something
super obvious!

It’s called the Sequence node:

305515-annotation-2020-06-26-144245.jpg

So I’ll need that and a branch that’s first checking to see if the player is sprinting, and has reached a speed greater than the Running speed, then another checking to see if the speed has since decreased (and if so disabling Sprint mode)?

I have a simple toggle for Sprint set up to increase max walk speed/return it to default, but I’m trying to make the transition back from sprinting possible even without manual input (i.e. without having to press the button again).

I actually got this to work using an Event Tick, Branch and a check to verify the player character’s forward and left/right momentum. Basically if they were below a certain speed it would automatically uncheck sprinting. Other wise you toggle sprint, slow down (either now input or less input on an analogue stick) or worse stop, then immediately start sprinting again.

The issue I’m having is I need the event tick for something else, so I’m wondering how to included it in the Sprint toggle function. I’ve tried a WhileLoop doing the same check as the original Branch, but just get told it’s creating an indefinite loop.

I feel like I must be missing something super obvious!

Not sure, sounds a bit like this:

How close are we getting?

Hmm… that “compare float” is interesting! It might make my life easier in terms of branches and may also solve the issue of preventing me from sprinting altogether… I shall investigate and get back to you!

Aye, no one likes cascading branches. Hard to avoid at times, though.

Sequence solved it! :smiley: