I’m trying to implement a slow walk function to toggle crouch speed but unable to integrate it properly.
Hey @INSOLENCE9945!
So first, going to get it out of the way, but don’t fall into the flip-flop trap! Just replace it with a branch checking if “crouch=T/F” and go the opposite path from what your bool is set to- otherwise you could say:
- Crouch. Sets off flip flop to True.
- Sprint. Turns off crouch but does not set flip flop off.
- Try to crouch again? Sets crouch to false using flip flop.
- Try to crouch a third time and this time it works!
The problem is flip flops work in a vacuum but when you start adding variables or states that can be changed elsewhere they fail .
So after changing that, can you show us what your “Toggle Crouch” and “Change movement speed” events look like?
You should be able to add the “is Crouching” boolean AND the alteration of speed into the event, or even better, have it as a Function, with an input of T/F Selection.
Get back to us soon and when you bring the “Toggle Crouch” and “Change Movement Speed” code pics if you’re still lost let us know!
As you mentioned, I’ve removed Flip-Flop
and attached screenshots of Toggle Crouch Function, Change Crouching Speed Function and Slow walk setup.
Here I think this is the easiest way. You’re a tad overengineering it
Try this!
Hope that does it for you!
Yay! It worked, thanks a lot!