What does this function do?

Hi, I’m new to blueprints scripting and I’m following this basic character creation in the Unreal docs
But I can’t understand what is this function do. I get the check for crouch and prone(disable movement) because there is no animation for jumping from this position, but I don’t understand why to do anything if crouch is true because you cant jump from it?
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/CharacterMovement/Blueprints/Setup_2/index.html

Hey Hoe,

this is just a check IF the Maximum Walk Speed of the Chracacter Movement Component is bigger then 160.
If it is bigger then the TRUE Execution Pin of the “Branch Node” will be triggered and the rest of the Nodes which are on the right side of the Node will be triggered.

IF it is false nothing happens

Greetings

Ok I should have read your whole question :smiley:
Sorry for that.

I didn’t really test this method but I would suggest that you can jump while crouching if your Maximum Walk speed exceeds 160.

Greetings

but in this tutorial we set the max speed while crouch to 160 so it can’t be bigger if the character is crouch. And there no animation for jumping from crouch.
“For the Jump script, we are first checking if we are either Prone or Crouched. If neither are true, we are then using the CharacterMovement component to determine our current velocity and if it is greater than 0, which would mean that we are moving.”

Yeah you’re right thats a weird attempt to do this.
With this setup you can never jump if crouch is pressed.
But if for any reason the Maximum Walk Speed exceeds 160 (which should not happen, because crouch was pressed), you can jump while crouching, without an actual Animation which transitions between those two states.

Either the Tutorial guys/girl did a mistake or it’s just another check to allow jumping while crouching

Greetings

From what I can gather, this is basically saying that if you are crouched and moving fast enough (possibly because they wanted to allow a faster crouch mode in the future or just a as cautionary double check in case you are still crouched but the button is not pressed for some reason) you can jump. It then goes to allow you to jump higher if you are moving or less if you are standing still.

That what I thought, Just wanted to be sure I understand everything being this is my first time doing that.

Thank you

No problem :wink: