# Stamina Drian Problem?!?!

**URL:** <https://forums.unrealengine.com/t/stamina-drian-problem/2658721>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [September 21, 2025, 3:21pm UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721 "2025-09-21T15:21:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stale\_bathtub483](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stale\_bathtub483](https://forums.unrealengine.com/u/Stale_bathtub483)\
**Post date:** [September 21, 2025, 3:21pm UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/1 "2025-09-21T15:21:37Z")

</div>

I have a stamina system, and when a press shift it doesn’t drain stamina if I’m not running, BUT when I hold shift after i have already started sprinting and then I stop with shift being pressed down it still drains the stamina and plays my camera shake. What do I do?

 ![unknown_2025.09.21-11.21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/5/235b70286a55382f55f8104a755b804077266dec.jpeg)

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [September 21, 2025, 3:42pm UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/2 "2025-09-21T15:42:08Z")

</div>

Hey @Stale_bathtub483

so you want to drain stamina when you are sprinting =\> Running/velocity above 0 + SHIFT and you want to gain stamina when you are standing/velocity=0 ?

Where do you set your IsSprinting boolean to true or false? Where do you call your stamina events?

---

<div class="post-metadata">

**Author:** ![Stale\_bathtub483](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stale\_bathtub483](https://forums.unrealengine.com/u/Stale_bathtub483)\
**Post date:** [September 21, 2025, 10:22pm UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/3 "2025-09-21T22:22:00Z")

</div>

im sorry idk what you mean by stamina events, this is a better look at my stamina though.

 ![unknown_2025.09.21-11.15_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/5/6b50a429eec5e467db333765e7eed8d2f9d52cdd.jpeg)

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [September 22, 2025, 7:58am UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/4 "2025-09-22T07:58:35Z")

</div>

Hey @Stale_bathtub483

I meant your CustomEvents called GainStamina and DrainStamina, sry. Do you call these Events with your CustomEvents for sprinting? Can you Show your CustomEvents for sprinting?

---

<div class="post-metadata">

**Author:** ![PILAR\_ENNAJMI](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PILAR\_ENNAJMI](https://forums.unrealengine.com/u/PILAR_ENNAJMI)\
**Post date:** [September 22, 2025, 1:33pm UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/5 "2025-09-22T13:33:44Z")

</div>

so you want to drain stamina when you are sprinting =\> Running/velocity above 0 + SHIFT and you want to gain stamina when you are standing/velocity=0 donwloa game freeat [apkloky](https://apkloky.com/)

---

<div class="post-metadata">

**Author:** ![Stale\_bathtub483](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stale\_bathtub483](https://forums.unrealengine.com/u/Stale_bathtub483)\
**Post date:** [September 22, 2025, 2:07pm UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/6 "2025-09-22T14:07:06Z")

</div>

This is my run I am really new to unreal, but I’m not calling drain or gain that event only happens when that specific blueprint is called, I don’t have time to look at my code now this is a picture from yesterday but I can get more screenshots if necessary.

 ![unknown_2025.09.21-11.15](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/d/fdd1ef162bbb000644cf3cf6e4e2c1780d5c2126.jpeg)

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [September 22, 2025, 3:35pm UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/7 "2025-09-22T15:35:41Z")

</div>

Hey @Stale_bathtub483

here is an example how you can create a stamina system:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/9/2/692f56e4f9638e3a8e86929a53af31990d8a4bae.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/0/3/4039fe332120bbc8ba67999a9118903972ddc698.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/c/42c1cfc1b7de34ab66efb44dbeac964f3a00f496.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/6/0/3608c487b35d3a2bded40cd905c90114858ae3dd.png)

In this example I call the stamina event with the timer.

[Sprinting.zip](https://forums.unrealengine.com/uploads/short-url/oWc6hyJ1Yv7aO8TwrLalvXR7aUJ.zip) (55.8 KB)

This example is from this post [losing stamina while holding shift and not moving - #6 by L1z4rD89](https://forums.unrealengine.com/t/losing-stamina-while-holding-shift-and-not-moving/1156620/6) where you will also find your stamina system. I think you are missing the IsVelocity \> 0 check like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/d/d0d198c86d580915becb5fd67af5906111cc9ea7.png)

---

<div class="post-metadata">

**Author:** ![Stale\_bathtub483](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stale\_bathtub483](https://forums.unrealengine.com/u/Stale_bathtub483)\
**Post date:** [September 22, 2025, 11:12pm UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/8 "2025-09-22T23:12:08Z")

</div>

i will try this i will also look into your stamina thank you i will let you know if there is any trouble or if it doesnt work.

---

<div class="post-metadata">

**Author:** ![Stale\_bathtub483](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stale\_bathtub483](https://forums.unrealengine.com/u/Stale_bathtub483)\
**Post date:** [September 22, 2025, 11:20pm UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/9 "2025-09-22T23:20:11Z")

</div>

THANK YOU, seriously that fixed it, i had to add that line of code to my camera shake to but now it works thank you very much.

---

<div class="post-metadata">

**Author:** ![Stale\_bathtub483](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stale\_bathtub483](https://forums.unrealengine.com/u/Stale_bathtub483)\
**Post date:** [September 23, 2025, 2:36am UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/10 "2025-09-23T02:36:49Z")

</div>

sorry but it fixed my problem but now when i stand After i have ran and then run again it doesn’t drain until i let go then hold again

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [September 24, 2025, 2:38pm UTC](https://forums.unrealengine.com/t/stamina-drian-problem/2658721/11 "2025-09-24T14:38:11Z")

</div>

Hey @Stale_bathtub483

the velocity check does not work as intended. Can you try this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/d/addfa32020dd34137e3b2977a5ffd9e8aec81484.png)

or

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/4/2e4968c85004d31521ff88414f05e4a346ace791.png)

and:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/0/5c0577edce34b70bf4ff01fe817dae7c820f4de6.png)

[SprintingAlternative.zip](https://forums.unrealengine.com/uploads/short-url/v05CHAjBI6wZGgngRbc91cskwGj.zip) (54.2 KB)
