Unreal Engine Enhanced Input Sprint

Firstly, we need to create a new Input Action. I named it IA_Sprint and placed it in "Content Drawer>Content>ThirdPerson>Input>Actions".

Then, we need to select the Value Type as Digital(bool).

Next, we should add the IA_Sprint that we created to IMC_Default in "Content Drawer>Content>ThirdPerson>Input" and assign a key binding to it.

To be able to call and use the input that we created in BP_ThirdPersonCharacter, we need to make a few settings beforehand.

First, while the CharacterMovement component is selected, we need to search for "max speed" in the details panel and set our Max Walk Speed value to 250. This way, we set our walking speed to 250.

Then, we need to create 2 different float variables named WalkSpeed and SprintSpeed.

After creating our variables, we need to Compile and Save.

Then, we need to set the WalkSpeed value to 250 and the SprintSpeed value to 500.

 

After creating these, we need to create two different functions named SprintStart, SprintStop.

The content of SprintStart function:

The content of SprintStop function:

Now, all we have to do is to call and use IA_Sprint in BP_ThirdPersonCharacter: