UE5 Sprint Stamina No Tick

UE5 Sprint Stamina No Tick

In this Unreal Engine tutorial, you will build a clean sprint and stamina system without using Event Tick. Instead of running stamina logic every frame, we use Blueprint timers to drain stamina only when the player is sprinting and recover stamina only when recovery is needed.

This is a better workflow for gameplay systems because it is cleaner, easier to debug, and more scalable than constantly checking values on Tick. The system also includes a simple stamina UI with a progress bar so the player can clearly see stamina drain and recovery during gameplay.

Watch the full video tutorial: Unreal Engine Sprint & Stamina System Without Event Tick

Subscribe for more Unreal Engine tutorials: Rambod YouTube Channel

What You Will Build

By the end of this tutorial, you will have a sprint and stamina system where the player can hold a sprint key, move faster, lose stamina over time, stop sprinting when stamina runs out, and recover stamina automatically after sprinting stops.

The system includes:

  • A sprint input action bound to Left Shift
  • Walk speed and sprint speed control
  • Stamina drain while sprinting
  • Stamina recovery after sprinting stops
  • No Event Tick usage
  • Timer-based update logic
  • A stamina UI widget
  • A progress bar that displays stamina percentage

This is a practical gameplay foundation for RPGs, survival games, shooters, action games, and third-person projects where sprinting should be limited by player stamina.

Why You Should Avoid Event Tick for This System

Event Tick runs every frame. If your game is running at sixty frames per second, Tick fires sixty times every second. If your game runs at one hundred twenty frames per second, it fires one hundred twenty times every second.

That is not automatically bad. Tick is useful for systems that truly need frame-by-frame updates, such as camera smoothing, animation-dependent logic, or real-time interpolation. But stamina drain does not need to run every frame.

Stamina is usually a gameplay value that can update several times per second and still feel responsive. Running it on a timer every zero point one or zero point two seconds is usually enough.

Using Tick for stamina is overkill. It works in a small tutorial project, but it becomes bad habit fast. In larger projects, many small Tick-based systems add up and create unnecessary overhead.

A timer-based approach is better because:

  • It only runs when needed
  • It updates at a controlled interval
  • It is easier to start and stop
  • It avoids constant per-frame checks
  • It keeps Blueprint logic cleaner

The harsh truth: using Tick for everything is beginner behavior. Learn timers early and your Blueprint systems will be cleaner.

Core Logic Overview

The system is built around two timer-driven functions:

  • SprintTimerFunction: drains stamina while the player is sprinting.
  • StaminaRecoveryFunction: restores stamina when the player is not sprinting.

When the player presses the sprint key, we start the sprint timer. When the player releases the sprint key or stamina reaches zero, we stop the sprint timer and start the recovery timer.

This creates a controlled loop:

  • Press sprint
  • Increase movement speed
  • Drain stamina through a timer
  • Stop sprinting when released or empty
  • Recover stamina through another timer
  • Stop recovery timer when stamina is full

No Tick. No frame spam. No unnecessary updates.

Step One: Create the Sprint Input

First, you need an input that tells Unreal when the player wants to sprint.

In older input workflows, you can open:

Edit > Project Settings > Input

Then add a new Action Mapping:

Sprint

Bind it to:

Left Shift

This gives you a Sprint input event inside the player character Blueprint.

If you are using Enhanced Input, the idea is the same. Create an Input Action for sprint, set it as a digital button input, add it to your Input Mapping Context, and bind it to Left Shift.

Step Two: Create the Required Variables

Open your player character Blueprint. In a Third Person Template project, this is usually:

BP_ThirdPersonCharacter

Create the following variables:

Variable Name Type Default Value Purpose
IsSprinting Boolean False Tracks whether the player is currently sprinting.
Stamina Float 100 Current stamina value.
MaxStamina Float 100 Maximum stamina value.
StaminaConsumptionRate Float 1 How much stamina is drained per timer update.
StaminaRecoveryRate Float 1 How much stamina is restored per timer update.
WalkSpeed Float 300 Normal movement speed.
SprintSpeed Float 600 Movement speed while sprinting.

These values are only starting points. You should tune them based on your game feel. For example, a tactical shooter may use slower sprint recovery, while an arcade action game may use faster stamina regeneration.

Step Three: Create the Sprint Timer Function

Inside your character Blueprint, create a new function named:

SprintTimerFunction

This function is responsible for draining stamina while sprinting.

The logic should do four things:

  • Stop stamina recovery while sprinting
  • Check if the player is allowed to keep sprinting
  • Set movement speed to sprint speed
  • Reduce stamina over time

The basic logic flow is:

  1. Clear the recovery timer so stamina does not recover during sprint.
  2. Check if IsSprinting is true.
  3. Check if Stamina is greater than zero.
  4. If both are true, set Max Walk Speed to SprintSpeed.
  5. Subtract stamina by the consumption rate.
  6. Clamp stamina between zero and MaxStamina.
  7. If stamina reaches zero, stop sprinting and start recovery.

The most important part is clamping stamina. Never let stamina go below zero or above the maximum value. Clamping prevents weird UI values and logic bugs.

New Stamina = Clamp(Stamina - StaminaConsumptionRate, 0, MaxStamina)

If stamina reaches zero, the player should no longer sprint. At that point:

  • Set IsSprinting to false
  • Set Max Walk Speed back to WalkSpeed
  • Clear the sprint timer
  • Start the stamina recovery timer

Step Four: Create the Stamina Recovery Function

Next, create another function named:

StaminaRecoveryFunction

This function handles stamina regeneration after sprinting stops.

The recovery function should:

  1. Check if Stamina is lower than MaxStamina.
  2. If true, increase stamina by StaminaRecoveryRate.
  3. Clamp stamina between zero and MaxStamina.
  4. If stamina is full, clear the recovery timer.

The formula is:

New Stamina = Clamp(Stamina + StaminaRecoveryRate, 0, MaxStamina)

Once stamina reaches MaxStamina, the recovery timer should stop. This matters because there is no reason to keep running a timer after stamina is already full.

That is the whole point of this optimized workflow: run logic only when it needs to run.

Step Five: Handle Sprint Pressed Logic

Now go back to the Event Graph and add your Sprint input event.

On Sprint Pressed:

  1. Check if Stamina is greater than zero.
  2. If true, set IsSprinting to true.
  3. Start a looping timer using Set Timer by Function Name.
  4. Function Name should be SprintTimerFunction.
  5. Set the timer interval to something like 0.2 seconds.
  6. Enable Looping.

Example timer values:

Function Name: SprintTimerFunction
Time: 0.2
Looping: True

A timer interval of zero point two seconds means the stamina drain function runs five times per second. That is more than enough for a stamina system.

If you want smoother stamina UI movement, you can use zero point one seconds. If you want even less processing, use zero point two or zero point twenty-five seconds.

Step Six: Handle Sprint Released Logic

On Sprint Released:

  1. Set IsSprinting to false.
  2. Set Character Movement Max Walk Speed back to WalkSpeed.
  3. Clear Timer by Function Name for SprintTimerFunction.
  4. Start Set Timer by Function Name for StaminaRecoveryFunction.

Recovery timer example:

Function Name: StaminaRecoveryFunction
Time: 0.2
Looping: True

This means stamina begins recovering after the player stops sprinting.

If you want a delay before stamina recovery begins, add a Delay before starting the recovery timer. For example, a survival game might wait one second before stamina starts regenerating.

Step Seven: Set Movement Speed Correctly

Sprinting is controlled by the Character Movement component.

To change player speed, use:

Character Movement > Set Max Walk Speed

When sprinting:

Max Walk Speed = SprintSpeed

When not sprinting:

Max Walk Speed = WalkSpeed

Do not hardcode the speed directly into the Set Max Walk Speed node if you plan to expand the system. Use variables. Variables make balancing easier later.

For example, you may later create different movement modifiers:

  • Slow effect from damage
  • Speed boost pickup
  • Heavy armor penalty
  • Stamina upgrades
  • Crouch speed
  • Weapon aim movement speed

If the system is variable-driven, expanding it is much easier.

Step Eight: Create the Stamina UI Widget

Now create a simple UI so the player can see stamina.

In the Content Drawer:

Right Click > User Interface > Widget Blueprint

Name it:

WBP_Stamina

Open the widget and add:

  • A Canvas Panel as root
  • A Text Block for stamina text if you want numeric feedback
  • A Progress Bar for visual stamina feedback

A progress bar is better for gameplay because players can understand stamina at a glance without reading exact numbers.

Step Nine: Bind the Progress Bar Percent

The Progress Bar Percent value expects a number between zero and one.

That means you need to convert stamina into a normalized percentage:

Stamina / MaxStamina

If stamina is one hundred and max stamina is one hundred, the result is one.

If stamina is fifty and max stamina is one hundred, the result is zero point five.

If stamina is zero, the result is zero.

This normalized value plugs directly into the Progress Bar Percent.

Blueprint logic:

  1. Get Owning Player Pawn.
  2. Cast to BP_ThirdPersonCharacter.
  3. Get Stamina.
  4. Get MaxStamina.
  5. Divide Stamina by MaxStamina.
  6. Return the result as Percent.

For a beginner tutorial, binding is fine. For larger UI systems, you may later replace bindings with event-driven updates for better UI performance.

Step Ten: Add the Widget to the Viewport

Open BP_ThirdPersonCharacter and go to Event Begin Play.

Add:

Create Widget

Set the class to:

WBP_Stamina

Then connect the return value to:

Add to Viewport

Now when the game starts, the stamina UI appears on screen.

Suggested Blueprint Flow

Here is the complete system flow in plain language.

When Sprint Is Pressed

  • Check Stamina greater than zero
  • Set IsSprinting to true
  • Start SprintTimerFunction with a looping timer
  • Clear recovery timer if needed

Inside SprintTimerFunction

  • Set movement speed to SprintSpeed
  • Subtract stamina
  • Clamp stamina between zero and MaxStamina
  • If stamina reaches zero, stop sprinting
  • Clear sprint timer
  • Start recovery timer

When Sprint Is Released

  • Set IsSprinting to false
  • Set movement speed back to WalkSpeed
  • Clear sprint timer
  • Start recovery timer

Inside StaminaRecoveryFunction

  • Add stamina
  • Clamp stamina between zero and MaxStamina
  • If stamina reaches MaxStamina, clear recovery timer

Why Timers Are Better Than Tick Here

This system only needs to update stamina during two situations:

  • When stamina is being drained
  • When stamina is being recovered

Outside of those moments, there is nothing to update.

Event Tick does not care. Tick runs anyway. Every frame. Forever. That is the problem.

Timers are more intentional. You start them when needed and stop them when finished.

This design pattern is useful beyond stamina. You can use similar timer logic for:

  • Health regeneration
  • Mana recovery
  • Poison damage over time
  • Burning damage
  • Cooldown counters
  • Hunger and thirst systems
  • Energy recharge systems

Once you understand this pattern, you stop abusing Tick for simple gameplay loops.

Common Mistakes

Forgetting to Clear Timers

If you start a looping timer and never clear it, the function will keep running. Always clear the sprint timer when sprinting stops and clear the recovery timer when stamina is full.

Letting Stamina Go Below Zero

Always clamp stamina. Negative stamina creates bad UI values and can break conditions.

Recovering While Sprinting

Make sure the recovery timer is cleared when sprinting begins. You do not want stamina draining and recovering at the same time unless your game intentionally allows it.

Hardcoding Speed Values Everywhere

Use WalkSpeed and SprintSpeed variables. Hardcoded values make balancing painful later.

Using Tick Because It Feels Easier

Tick may feel easier at first, but it creates bad habits. Timers are barely harder and much cleaner for this type of system.

How to Tune the System

The feel of sprinting depends on three main values:

  • SprintSpeed
  • StaminaConsumptionRate
  • StaminaRecoveryRate

If sprinting lasts too long, increase stamina consumption or lower MaxStamina.

If sprinting feels too short, lower stamina consumption or increase MaxStamina.

If recovery feels too slow, increase StaminaRecoveryRate.

If recovery feels too forgiving, decrease StaminaRecoveryRate or add a delay before recovery starts.

Do not tune only one value. Sprint feel comes from the relationship between movement speed, drain rate, recovery rate, and level design.

Possible Upgrades

This tutorial builds the foundation. You can expand it into a more advanced movement system.

  • Add a recovery delay after sprinting stops
  • Block sprinting until stamina recovers above a minimum threshold
  • Add breathing or fatigue sound effects
  • Add screen effects when stamina is low
  • Make stamina drain only while the player is moving
  • Reduce stamina drain when walking downhill
  • Add sprint upgrades or equipment modifiers
  • Replicate stamina for multiplayer
  • Move stamina into a reusable Actor Component

The best next step is turning this into a reusable Stamina Component. That would let you attach the same stamina logic to the player, enemies, or any actor that needs energy-based actions.

Beginner Version vs Production Version

The version in this tutorial is beginner-friendly and practical. It is good for learning and small to medium projects.

For a more production-ready version, you would likely improve it by:

  • Moving stamina logic into an Actor Component
  • Using Timer Handles instead of function name timers
  • Updating UI through events instead of bindings
  • Adding movement-state checks
  • Supporting multiplayer replication
  • Adding gameplay tags or state checks for blocking sprint

Function-name timers are simple and beginner-friendly. Timer handles are cleaner and safer for larger systems. If you are building a serious project, eventually move toward timer handles.

Conclusion

You now have an optimized sprint and stamina system in Unreal Engine without using Event Tick. The system uses timers to drain stamina while sprinting and recover stamina when sprinting stops. It also includes movement speed switching and a stamina UI progress bar.

This approach is cleaner than Tick-based stamina logic and teaches a useful pattern you can reuse across many gameplay systems. Use Tick only when you truly need frame-by-frame updates. For stamina, timers are the better choice.

Watch the full tutorial: Unreal Engine Sprint & Stamina System Without Event Tick

More Unreal Engine tutorials: rambod.net

Subscribe for more: Rambod YouTube Channel

Frequently Asked Questions

Why not use Event Tick for stamina?

Event Tick runs every frame, even when stamina does not need to update. For stamina drain and recovery, timers are cleaner and more efficient.

What timer interval should I use?

Zero point one or zero point two seconds is usually enough. Use zero point one for smoother UI changes and zero point two for lighter updates.

Can I use this system with Enhanced Input?

Yes. The tutorial concept works with both old input mappings and Enhanced Input. You only need a digital sprint action bound to Left Shift or another key.

Can this work in multiplayer?

The basic logic can be adapted for multiplayer, but you need replication and server-authoritative stamina handling. Do not trust client-only stamina in a real multiplayer game.

Should stamina be inside the character Blueprint?

For a beginner tutorial, yes. For a larger project, a reusable Actor Component is better because it keeps stamina logic modular.

Why does the progress bar need Stamina divided by MaxStamina?

Progress Bar Percent expects a value from zero to one. Dividing current stamina by max stamina converts the value into a normalized percentage.

Can I add a delay before stamina recovery starts?

Yes. Add a Delay after sprint release before starting the recovery timer. This makes stamina feel less forgiving and more tactical.

Rambod Ghashghai

Rambod Ghashghai

Technical Director & Unreal Engine Educator

Senior systems architect and Unreal Engine technical educator with 11+ years of enterprise infrastructure experience. Director of IT at Tehran Raymand Consulting Engineers and creator of Rambod Dev.

Full profile

Related Tutorials

More lessons connected by category, tags, engine version, or implementation type.

What To Do Next

Keep exploring practical Unreal Engine and systems programming work.

Recommended resource

Recommended for this tutorial

Useful tools selected for this workflow topic.

Share this page

Send it to your network in one tap.

Instagram doesn’t provide direct web share links. We copy your URL and open Instagram.