Now, we want to customize our sprint Blueprint nodes to fire the custom Event that we just created so that the player's stamina drains as they sprint, as seen in the following screenshot:
From the output execution pin of the node setting walk speed to 2200.0, drag a wire onto empty space and add a SET Is Sprinting node. Check the checkbox inside this node to set the Boolean value to True when the player is sprinting. Next, we want to make sure that stamina is continually drained as long as the left Shift key is held down. To do so, we can utilize a timer, as shown in the following screenshot:
Timers ...