How to Make a Run and Stamina System in Unreal Engine 5

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 พ.ย. 2024

ความคิดเห็น • 325

  • @SLASHERHEATH
    @SLASHERHEATH 2 ปีที่แล้ว +46

    Thanks for the vid! I'm now adding a penalty system for when you complete deplete all your stamina.
    In case anyone has problems make sure to Set your "Can Replenish Stamina" bool back to true after subtracting Stamina:)
    Also, no need to keep setting walk speed, just reroute back to your retriggable delays each time:)

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว +16

      Thank you for watching!! Yeah good observations there!! Everyone take note! ✍️

    • @DigeL-el6uo
      @DigeL-el6uo ปีที่แล้ว +3

      Thank you! Worked.

  • @cyberchef8344
    @cyberchef8344 6 หลายเดือนก่อน +4

    Correct me if I'm wrong, but this design causes the HUD to check the stamina and run a calculation for the percentage every game tick. I wouldn't recommend this design. You should use event dispatchers in the character class to notify the HUD that it's stamina bar should be updated. It's a bit more work, but definitely a more efficient system. A simple HUD for a singleplayer game probably won't be too much of an issue, but if you continually use this design pattern you're going to end up with a very inefficient game at release time. Better to take the time and do it correctly in the beginning before you start learning bad habits.

  • @pterafier
    @pterafier 8 หลายเดือนก่อน +4

    I've come back to this video like 5 times just for the simple percentage math D': my math skills are absolutely horrible but this video saves me every time lol thanks dude!

  • @mike.s.3834
    @mike.s.3834 10 หลายเดือนก่อน +34

    For those who are having an error of having to wait to finish recharging stamina before being able to run again, I did the following:
    In the custom event Increase Stamina, after the SET node I put another branch asking if IsRunning is true, and then I set the Increase Stamina? variable to false. If Is Running is false, then I follow the same code from the video, asking if the stamina is greater than or equal to 100, if it is, then I can't increase the stamina, if it's not, I set the Increase Stamina variable to false.
    It worked well for me.

    • @UnderRatedRock
      @UnderRatedRock 8 หลายเดือนก่อน +3

      thx bro worked for me

    • @GAMarine137
      @GAMarine137 8 หลายเดือนก่อน +2

      Yep, much better now

    • @valentinvadrot6695
      @valentinvadrot6695 7 หลายเดือนก่อน

      yes u have to just put a and boolean and put is running with a not boolean and put increase stamina in the other link and put to the condition to the branch

    • @arrayofarts2560
      @arrayofarts2560 6 หลายเดือนก่อน

      Could you make a video? I’m having trouble understanding.

    • @valentinvadrot6695
      @valentinvadrot6695 6 หลายเดือนก่อน

      @@arrayofarts2560 give me you'r discord i send u

  • @Baleur
    @Baleur ปีที่แล้ว +60

    Edit: FIXED. Right after the "AddStamina" custom event, you must add a Branch with condition Get IsRunning, to only continue if False.
    That solves the issue where tapping sprint can let you keep running with stamina regen, because the stamina regen logic NEVER ENDS until it reaches 100, thats why we have to interrupt it mid-flow any time we start running.
    For this and the Healthbar tutorial, i recommend viewers to set a "MaxStamina" and "MaxHealth" variable, which is then used instead of manual numbers in the calculations. This so that if you ever have items or systems that increase either one, the new max will be used.
    But with this said, im having bugs with this stamina setup. If i tap shift while running (so it flickers on and off between canincreasestamina), it ends up replenishing stam even while running, or it ends up never replenishing at all.

    • @c0nsumption
      @c0nsumption ปีที่แล้ว +1

      Can you explain this further? So confused with the writing

    • @joshstamand3115
      @joshstamand3115 ปีที่แล้ว

      Tried that. Still having problems - see my comment above.

    • @davidvdbergen
      @davidvdbergen ปีที่แล้ว

      Thanx! That fixed the issue!

    • @pauljanzen6289
      @pauljanzen6289 ปีที่แล้ว

      How do you get the MaxStamina variable into the stamina bar widget? Without this the bar is stuck with a single setting for max stamina display.

    • @mage_2575
      @mage_2575 ปีที่แล้ว +3

      May have found a fix:
      I attached the "True" part of the branch to the "Cant Increase Stamina=False" part of the code, and so far it has fixed both problems.

  • @TheDeathbyPurple
    @TheDeathbyPurple ปีที่แล้ว +4

    Excellent tut. If you don't want all the booleans, after +/- stamina and before set stamina just add a 'clamp float' node with the min and max set to 0 and 100. This will stop the stamina from going under 0 or above 100. Do this for health picks ( you have 90 health and the pick up gives you 20. It will only give you 10, for example) or anything you want to clamp the values for.

  • @guilhermeprada2288
    @guilhermeprada2288 2 ปีที่แล้ว +5

    I'm just learning UE5 and your video made it so easy to understand the blueprint system. I like that you made really straight-forward. Thanks for the content!

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว +1

      Thank you so much!! I really appreciate it!!

  • @dr.paninozzo2421
    @dr.paninozzo2421 4 หลายเดือนก่อน

    Hey man, just wanted to thank you. I'm slowly getting into unreal engine with absolutely zero programming experience and thanks to your tutorials i'm learning a lot. It may not be much but after i watched your video, i managed to make a working sprinting and stamina mechanic on my own. Thank you very much! 😄

  • @RaZy77_
    @RaZy77_ ปีที่แล้ว +12

    For those who are having an issue with cant add event begin play, just use the default begin play, connect it as in video and then continue to connect movement.

    • @raptorzx442
      @raptorzx442 9 หลายเดือนก่อน +2

      There’s only one for me

    • @InfernoBerk
      @InfernoBerk 9 หลายเดือนก่อน +5

      use seuquence to fix it

  • @reeanimationgaming1034
    @reeanimationgaming1034 4 หลายเดือนก่อน +3

    Thanks for the tutorial. Very helpful.. It needs a few fail saves though.. As my kid figured out, if you spam the sprint button, you can sprint for much longer. So I added in a new retriggerble delay of 0.5 to prevent sprint spamming.
    Also added “can not sprint if velocity is less than 10.
    I also added an extra stamina cost when pushing the button to further decrease to feeling of spamming the button..
    But great tutorial, and a very good way of doing it 🙂👍

    • @stickxddx
      @stickxddx 2 หลายเดือนก่อน +2

      how did you add can not sprint if velocity is less than 10

    • @reeanimationgaming1034
      @reeanimationgaming1034 2 หลายเดือนก่อน +1

      @@stickxddx get the velocity of the player character. Make a branch, if the velocity is less than 100, then do nothing

  • @mrsniffles2528
    @mrsniffles2528 10 หลายเดือนก่อน +19

    Found 2 problems with this #1: Holding shift and standing still will make the stamina bar go down. #2: While the stamina bar is increasing if you try running the stamina bar will try to increase and decrease at the same time.

    • @tylercathey
      @tylercathey 9 หลายเดือนก่อน

      Yep. This guy sucks

    • @FcbDev
      @FcbDev 8 หลายเดือนก่อน +14

      For your first problem you could Get Velocity then drag and get Vector Length then from there get a > with 0 as the bottom value and plug that into a Branch at the start of the event and plug True back into the rest of your code 🙏💯

    • @Losmhi
      @Losmhi 6 หลายเดือนก่อน +17

      2# Problem
      Hi, if someone have problem if your stamina regenerates while running i have a solution.
      After branch inregen stamina on false add new branch with boolean is running, false Can incrise stamina yes, true can incrise stamina no. I hope it helps, ALSO I DID IT ALONE IM SO PROUD OF MYSELF

    • @dorby0578
      @dorby0578 6 หลายเดือนก่อน +1

      @@Losmhi THANK YOU SO MUCH!

    • @Footeditsabc
      @Footeditsabc 6 หลายเดือนก่อน +1

      @Losmhi Thank you so much, it really helpt me a lot. 😊

  • @Marept999
    @Marept999 ปีที่แล้ว +18

    If anyone is having the issue, where when you try to run, the stamina is also trying to regen and the character runs and stops rapidly, put a branch with your isrunning condition connected right before the event to regen stamina and after the retriggerable delay node, make it so it only continues if it's false.

    • @ard3nt417
      @ard3nt417 ปีที่แล้ว +1

      Can you help me make a tutorial video, please? I still don't understand.

    • @erichorton1440
      @erichorton1440 10 หลายเดือนก่อน +1

      You saved me!!!

    • @DRockafella
      @DRockafella 6 หลายเดือนก่อน

      Thank you.

    • @MystereedRL
      @MystereedRL 6 หลายเดือนก่อน

      THANK YOU! Just subbed to you as a thanks!

    • @sunfix991
      @sunfix991 6 หลายเดือนก่อน

      @@ard3nt417 lmao

  • @DevilFruitJourney
    @DevilFruitJourney 8 หลายเดือนก่อน +3

    I think i see a big problem. Try to press the Sprint Button without moving... IsSprinting should only be true if the button is PRESSED and there is a velocity in x or y axis. I've learned a lot from you. Thats why i can notice this. Have a good one!

    • @slimergaming7915
      @slimergaming7915 8 หลายเดือนก่อน

      how do i check if there is a velocity in the x or y axis?

    • @marcooasan1668
      @marcooasan1668 8 หลายเดือนก่อน +1

      @@slimergaming7915 get character movement get velocity convert it to vector length XY = your ground speed

  • @Amorcitos-v2b
    @Amorcitos-v2b 9 หลายเดือนก่อน +4

    If anyone has the "Event BeginPlay" set up for something else, you can just add a "Sequence" Right after, and connect the pins to the different events.

  • @boym8123
    @boym8123 4 หลายเดือนก่อน

    Thanks dude i used this button map to create a walk speed aswell. Little clunky going from sprinting to walking but run to sprint run to walk great so thanks for the stamina bar and for the base for other ideas.

  • @Bolverkr_
    @Bolverkr_ 4 หลายเดือนก่อน

    You are a life savior brother! Stay safe 🤘

  • @CelalBey.
    @CelalBey. ปีที่แล้ว +5

    Hey in 11:33 I am trying to connect As BP Third Person Game Mode to Target in Stamina but it says "BP Third mode person character object reference is not compatible with BP Third Person Game Mode Object reference." Can you help me with that please?

  • @jouzou4645
    @jouzou4645 ปีที่แล้ว +7

    I got an issue,sometimes while i sprint,even that i have stamina if i release shift and press again my character would start sprinting and stop immediately even tho i have stamina left

    • @magic_relic2429
      @magic_relic2429 10 หลายเดือนก่อน +1

      Right after the "AddStamina" custom event, you must add a Branch with condition Get IsRunning, to only continue if False.
      That solves the issue where tapping sprint can let you keep running with stamina regen, because the stamina regen logic NEVER ENDS until it reaches 100, thats why we have to interrupt it mid-flow any time we start running.

    • @Losmhi
      @Losmhi 10 หลายเดือนก่อน

      ​@@magic_relic2429Thanks bro

  • @mrspockyt
    @mrspockyt 2 ปีที่แล้ว +10

    Great video. While your character is standing static and you key left shift, your health automatically begins decreasing without moving. How would I go about fixing this issue please?

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว +8

      Yeah i missed that one 🤣 So when you press shift before doing all what we do, just get the "character movement component", then get the velocity from it (the yellow one because it's a vector), and then from it a vector length. Then you can make a branch, and in the vector length make a > bigger than and put 0. and in true you plug it into what we did, hope this helps!!

    • @jeyavarshanj
      @jeyavarshanj ปีที่แล้ว +3

      Sorry Can you please explain this in detail because I am beginner

    • @GrindedNick
      @GrindedNick ปีที่แล้ว

      @@GorkaGames ME SALVASTE GORKA SAPEEEEEEEEEEEE

    • @Mooshroom_RoadGhost
      @Mooshroom_RoadGhost ปีที่แล้ว +1

      So I understand everything your saying but I don’t understand what ‘Connect it to what we did’ means. Maybe it’s because I’m a beginner but I could seriously use someone’s help. 😢😢

    • @Rainbone-creative
      @Rainbone-creative 11 หลายเดือนก่อน

      If you still need info I think I have worked it out past this hurdle.
      dragging out of the end of each node as you progress add to your blueprint:
      Character Movement -(found in the components panel)
      Get Velocity (Scroll down list to find the one with the yellow tag on left)
      Vector Length
      > (greater than)
      Branch
      Disconnect the "USE STAMINA" node from the SET (stamina) node, Connect the custom event "Use Stamina" to the new BRANCH node ,Connect the BRANCH TRUE to the SET (stamina) at the start of the blueprint. @@Mooshroom_RoadGhost

  • @fhariri
    @fhariri 10 หลายเดือนก่อน +1

    Thanks goat!!! This really helped a lotttt :)

  • @МикитаТкачук-п1л
    @МикитаТкачук-п1л 5 หลายเดือนก่อน

    Урок отличный,все получилось,даже лучше чем хотел)

  • @onlyasecond
    @onlyasecond ปีที่แล้ว +2

    hey i know im too late but i have 2 probs,
    1. the stanima still in the top right corner with the cyan numbers.
    2. if i press shift its still decrease the stanima while i stand and dont move

    • @Mooshroom_RoadGhost
      @Mooshroom_RoadGhost ปีที่แล้ว

      Well as I still beginner I’m not quite sure how to fix the problem involving the movement part but I do know that to get ride of the cyan numbers you simply just need to delete the print node. Hope this helps

    • @ChronicleGames1
      @ChronicleGames1 หลายเดือนก่อน

      Delete the print string

  • @RandomPerson1572
    @RandomPerson1572 ปีที่แล้ว +5

    hey, is there a way to stop the stamina depleting when I press shift but I'm not moving? Everything else is great though!

  • @Tommyboi7566
    @Tommyboi7566 ปีที่แล้ว +2

    I have a problem with widgets they don't show up on my screen so you know the fix? I've tried so many things I did it right and everything I double checked it just doesn't show up

  • @h20xyg3n
    @h20xyg3n 8 หลายเดือนก่อน

    Thank you bro I just followed this :)

  • @merokka
    @merokka 2 ปีที่แล้ว +3

    Hey! I like your tutorials, it's easy to understand for beginner (like me). Just want to ask, how to add the delay when they use all of the stamina to increase the stamina back.

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว +2

      Thank you I really appreciate it! So in the "Increase Stamina" event add a branch before anything and ask if "stamina" is

  • @loki5298
    @loki5298 6 หลายเดือนก่อน

    thank you for such a clear and useful video😀😀

  • @nobertstanel9428
    @nobertstanel9428 10 หลายเดือนก่อน

    Thanks Gorka.

  • @LpSi-tx9fy
    @LpSi-tx9fy ปีที่แล้ว +2

    Gorka, hi, I have 2 problems: 1) when I stand still, but at the same time I press the shift, the stamina begins to fall, although I do not move. 2) During stamina regeneration by pressing the shift, it is spent, but at the same time it is restored. Please help me. I did everything according to your guide. I will be glad if you answer

    • @Iggy58444
      @Iggy58444 ปีที่แล้ว

      the first problem i cant solve but for the second one change one of the retriggable delay to 0.4 and it might fix the problem

  • @davefam-ep6cv
    @davefam-ep6cv 5 หลายเดือนก่อน

    We definitely gotta put gorka in the credits of our games for helping us. Thank you for the amazing videos

  • @quartzz-shorts
    @quartzz-shorts 4 หลายเดือนก่อน +1

    Thank you bro

  • @Зритель-ш6у
    @Зритель-ш6у 6 หลายเดือนก่อน +2

    Please make a new video with all the corrections written in the comments.

  • @vinivici2407
    @vinivici2407 ปีที่แล้ว +2

    Hello
    I'm having trouble pressing shift.
    Pressing quickly doesn't activate running acceleration every time, but stamina decreases each time.
    Where to look for the problem?

    • @brentmorgan1608
      @brentmorgan1608 ปีที่แล้ว +1

      Go to the delay timer in the sprint action and set it to .05, that delay sets how long after you hit sprint it activates

  • @PatrickVitelaYourAverageGamer
    @PatrickVitelaYourAverageGamer 2 หลายเดือนก่อน

    i love the videos! i already have a event begin so what should i supplement for?

  • @KANAWA2025
    @KANAWA2025 4 หลายเดือนก่อน

    all work good thank you bro! nost realistic stamina

  • @darknex2
    @darknex2 ปีที่แล้ว +3

    Hello, first of all very cool video, however I have a problem. I can't add the "EventBeginPlay" because it's already at "Add Input Mapping". As a result, the stamina bar is not displayed to me. How can I fix this?

    • @Phabic
      @Phabic ปีที่แล้ว +1

      What I did was I made the code then added the begin event play before the stamina widget then after adding to viewpoint I attached the cast t player controller and the code behind it.

    • @darknex2
      @darknex2 ปีที่แล้ว

      @@Phabic Thank you, it works

    • @Phabic
      @Phabic ปีที่แล้ว +2

      @@darknex2 Nice

    • @atomicplays8478
      @atomicplays8478 ปีที่แล้ว +3

      Or another way is to add a sequence node right after the EventBeginPlay.

    • @Phabic
      @Phabic ปีที่แล้ว

      @@atomicplays8478 Yeah that would also work :)

  • @IordanidisCharalampos
    @IordanidisCharalampos 4 หลายเดือนก่อน

    Hello. Very nice video. I would like to ask you if you can make a tutorial about a recommendation system or about recommendations to users (NPC) regarding their profile. I know it is very hard. Any advise or a tutorial would be much appreciated. Thank you

  • @crunchips3158
    @crunchips3158 9 วันที่ผ่านมา

    I figured out why this blueprint is broken. After shift clicked event after use and increase stamina the branch has to go back to retriggerable delay not to set. Hope that help and sorry for my bad english

  • @raifin1832
    @raifin1832 ปีที่แล้ว +3

    Okay so i started trying to make a game in unreal engine and i used your tutorial but i dont know if im the only one but im having problems. The main problem is that when i use the stamina when its on 100 i can run but when its below 100 i cant run anymore until it is 100. Ill be very happy if anyone can help me with this problem.

    • @nezarekssundner768
      @nezarekssundner768 ปีที่แล้ว +1

      Same Problem :( Are you were you able to fix it?

    • @chintan007bond
      @chintan007bond ปีที่แล้ว

      same here

    • @kintama3453
      @kintama3453 11 หลายเดือนก่อน

      Same problem

    • @Losmhi
      @Losmhi 10 หลายเดือนก่อน

      Hey, i know its been 9 months bit if you want i can help. After custom event ( incrise/add stamina) make a branch and for condition set "Is Running".And continue the code with false. (True don't connect to anything)

  • @HixxyDubz
    @HixxyDubz ปีที่แล้ว +3

    hey love the tutorial however i am running into an issue, when the stamina goes down if i try to use stamina again my character just stutters and does not go back to full speed with remaining stamina, is there a way to fix this please? thanks.

    • @CigiGames
      @CigiGames ปีที่แล้ว

      same I made the whole blueprint twice and still..

    • @K1ngCaden
      @K1ngCaden ปีที่แล้ว

      Has any further progress been made on this issue?

  • @HxzeonYoutube
    @HxzeonYoutube 2 ปีที่แล้ว +3

    Hey there 1 problem with this is there can only be 1 event begin-play so after following your tutorial to add a health bar and using it. i now cannot use the stamina bar as it requires another event begin play is there a way around this? [figured it out if you use a sequence it can run up to 5 events]

    • @GorkaGames
      @GorkaGames  ปีที่แล้ว +1

      yeah, you can use a sequence to have more code on the begin play more organized

    • @Astolfo4ever
      @Astolfo4ever ปีที่แล้ว

      yes mb , use 'sequence' for the multiple Actions on Event Begin Play .

  • @a7rogue487
    @a7rogue487 ปีที่แล้ว +1

    works good but if i hold the sprint key it drains stamina without even moving any fix?

  • @marshmallowwp
    @marshmallowwp 2 ปีที่แล้ว +1

    Awesome tutorial! After implementing it, what would cause the stamina to stop regenerating after pressing any key other than Left Shift?

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว

      Thanks! What do you exactly mean? So is that an issue that you are having that when you press any key it stops regenerating, or is that something that you want to implement?

    • @marshmallowwp
      @marshmallowwp 2 ปีที่แล้ว +1

      @@GorkaGames it is an issue I am having. I can press the stamina button (left shift) and it drains stamina then regens just fine. But if I were to press Q, for example, my stamina would no longer regen after draining.

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว

      @@marshmallowwp Hmm, so did you connect the "increase stamina" event on the released connection on the left-shift right?

    • @marshmallowwp
      @marshmallowwp 2 ปีที่แล้ว +1

      @@GorkaGames yes it is connected. It drains on pressing and regens stamina on releasing as it normally should until any other key is pressed. Then it will drain, but not regen.

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว +1

      @@marshmallowwp Could you send me a screenshot of the code perhaps by twitter?

  • @K1ngCaden
    @K1ngCaden ปีที่แล้ว +2

    Does Anybody know how i can edit it to make it disapear when nothing is happening with the stamina bar? thanks!

    • @leethememerwolf
      @leethememerwolf ปีที่แล้ว

      two ways to do it. when your not sprinting set the widget to be remove from parent. when sprinting make the widget come back add to view port. other way is hide the stamina bar only with a code.

  • @kloky-kv
    @kloky-kv ปีที่แล้ว +2

    How can I hide the blue numbers on the left? Great video btw

    • @GorkaGames
      @GorkaGames  ปีที่แล้ว +2

      you can just delete the print node

  • @The_Sharbel
    @The_Sharbel ปีที่แล้ว

    thx man your videos it a true help thx

  • @lapoulemexicaine1148
    @lapoulemexicaine1148 2 ปีที่แล้ว +2

    Great tutorial ! I'm just having an issue. When I run the stamina is decreasing but when i stop it doesn't increase except if I press shift again. Like instead of using stamina, running increases stamina.
    edit: Sorry i'm just stupid lol

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว +1

      Thank you!! Try this, set the "can increase stamina" bool back to try after subtracting the stamina

  • @mage_2575
    @mage_2575 ปีที่แล้ว +1

    Great vid!
    One question is how to you make the stamina run out vertically

    • @monkeebomb2971
      @monkeebomb2971 9 หลายเดือนก่อน

      did you find out? if yes could you explain?

    • @mage_2575
      @mage_2575 9 หลายเดือนก่อน

      @@monkeebomb2971 Sadly I have not

    • @meksahii
      @meksahii 6 หลายเดือนก่อน

      @@mage_2575 if you mean the progress bar, you just change its size so its vertical, and in the progress bar properties change "Bar Fill Type" to Top to Bottom

  • @User-ie8vl
    @User-ie8vl ปีที่แล้ว +1

    The tutorial was amazing but would this work for multiplayer clients? since it says, "set max walk speed." so would it effects all players? I'm new to Ue5

    • @LittleJT123
      @LittleJT123 5 หลายเดือนก่อน

      depends on how many playable characters you put in the game and if those characters all have the same walk speed or if you set them up to have individual speeds

  • @El3ctroSh0ck
    @El3ctroSh0ck 6 หลายเดือนก่อน

    Idk why but for a reason i need to change the retrigerable delay to a bigger number in order to run. For example if i put 20 i can run for 20 seconds.

  • @havalkanalismi4045
    @havalkanalismi4045 ปีที่แล้ว +2

    pressing shift quickly after releasing it will bug the system, character wont run and stamina will stuck because it is both replenishing and draining, whats the problem?

    • @Baleur
      @Baleur ปีที่แล้ว +2

      Fix it by adding a Branch directly after the IncreaseStamina custom event, which has "IsRunning" as the condition. Only proceed if false. This breaks the loop, otherwise it will continue to 100 stamina no matter what you do.

    • @BogomilLyubikov
      @BogomilLyubikov ปีที่แล้ว

      @@Baleur Thank you! You fixed my problem as well! Cheers!

    • @Mooshroom_RoadGhost
      @Mooshroom_RoadGhost ปีที่แล้ว

      I’m having the same problem I don’t know if I’m doing something wrong or if it’s just me being a beginner but it doesn’t seem to work.

  • @Alimadar
    @Alimadar 8 หลายเดือนก่อน

    Hi mate Thank a lot. Very helpful your all videos. Also i tried the stamina bars, but some reason don't let me on the graph screen add the other "Event begin play" . I had one all ready but if i swap it my character stop movements. You have some advice ? Thank you

    • @LyteRetro
      @LyteRetro 8 หลายเดือนก่อน +1

      you should be able to connect it to the end of whatever is at the end of that line. Create widget then add to viewport

    • @Alimadar
      @Alimadar 8 หลายเดือนก่อน +1

      Thank you @@LyteRetro

  • @LazyDev27
    @LazyDev27 หลายเดือนก่อน

    When I stop running before the bar is empty and start running again my character has trouble running and the bar doesnt fill or empty.

  • @miguelpradow
    @miguelpradow ปีที่แล้ว +3

    Para a galera que está com problema de regeneraçao ( de a stamina ficar aumentando quando corre pela segunda vez ) é so você adicionar um branch antes do increase stamina e depois do retriggerable delay ai voce adiciona tambem a condiçao IsRunning? e marca como falso para o increase. Espero ter ajudado.

  • @Ricks1271YT
    @Ricks1271YT 3 หลายเดือนก่อน +2

    Hello! So far the videos great but at 11:37 you add the begin play event. But when I try to add it, it just takes me to the add input mapping begin play event and does not want to add a new one do you know why?

    • @rqcun9441
      @rqcun9441 3 หลายเดือนก่อน +2

      its because you chose the third person template, just move the event begin play to the left and add the same stuff he did and then connect the add to viewport node into the cast to player controller

    • @Ricks1271YT
      @Ricks1271YT 3 หลายเดือนก่อน +1

      @@rqcun9441 tysm

    • @rqcun9441
      @rqcun9441 3 หลายเดือนก่อน +1

      @@Ricks1271YT np

    • @rqcun9441
      @rqcun9441 3 หลายเดือนก่อน +1

      @@Ricks1271YT lemme know if you need any help on the rest of the video, im decently experienced in unreal engine.

    • @Ricks1271YT
      @Ricks1271YT 3 หลายเดือนก่อน

      @@rqcun9441 yeah dude thanks

  • @nassemalsabah5610
    @nassemalsabah5610 ปีที่แล้ว

    Thank you. very Thnak.

  • @BrunoWBaldoin
    @BrunoWBaldoin 2 ปีที่แล้ว +1

    Tus videos son geniales, estoy aprendiendo mucho, sigue así

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว

      Muchas gracias!! Asi seguiré! 💪💪

    • @twintek1099
      @twintek1099 ปีที่แล้ว

      im very proud of myself for understanding that

  • @NearDoom
    @NearDoom ปีที่แล้ว +1

    i cant make multiple Event BeginPlay's... when i press it. it takes me to the one already there??

    • @Mooshroom_RoadGhost
      @Mooshroom_RoadGhost ปีที่แล้ว

      Well I’m not sure if you have fixed this or not but when you go to the beginPlay that’s already in your project then from that add a sequence. When you add the sequence connect/link up the Then 1 to where you would want to add the BeginPlay (so connect the Then 1 to the Create WP stamina widget) Hope this fixes everything but if not I’m sorry(pretty sure it’s unlikely for it to not work though

    • @NearDoom
      @NearDoom ปีที่แล้ว +1

      @Mooshroom_RoadGhost thanks for the reply. I did end up figuring out that, bit weird but makes sense. I wish people showed adding it on instead of it just flash appearing with a cut. Confused the hell outta me early on

  • @Pabson420
    @Pabson420 ปีที่แล้ว +1

    i have a question i cant create node event bedinplay cuz i already have it in the begining of the project and it wont let me what should i do ?

    • @Mooshroom_RoadGhost
      @Mooshroom_RoadGhost ปีที่แล้ว

      Well I’m not sure if you have fixed this or not but when you go to the beginPlay that’s already in your project then from that add a sequence. When you add the sequence connect/link up the Then 1 to where you would want to add the BeginPlay (so connect the Then 1 to the Create WP stamina widget) Hope this fixes everything but if not I’m sorry(pretty sure it’s unlikely for it to not work though

  • @quantumfellow9587
    @quantumfellow9587 5 หลายเดือนก่อน

    I have an issue where if you are holding the w key to move and hold for sprint the bar depletes but the walk speed of the player does not change

  • @sighberspook2021
    @sighberspook2021 3 หลายเดือนก่อน

    I have a problem, I followed the video and it generally works but it has this weird problem where my character is only capable of running when the bar is at full, I can't run at half stamina for example and even though I cant run, pressing the left shift button still causes the stamina bar to decrease despite the fact my character isn't running
    can anyone help with this?

  • @leosky789
    @leosky789 2 ปีที่แล้ว +1

    YOU'RE THE BEST!)

  • @magic_relic2429
    @magic_relic2429 10 หลายเดือนก่อน +2

    if you hold shift and you hold still keep drain the stamina you can fix by: pressed --> branch get velocity the vector !== A and then with the condition line it to the branch, then true in to the set runnig.

    • @saile1011
      @saile1011 7 หลายเดือนก่อน

      yooo im having this issue, can u explain a little clearer please ? so if left shift is pressed into a branch into get velocity ?

  • @lecion2233
    @lecion2233 ปีที่แล้ว +2

    For some reason when my stamina hits zero, my character continues to infinitely sprint. I cannot find a solution to this issue. Do you know of any solutions? Please let me know! Love your videos! Thank you! Just subscribed!

    • @Pawiel.99
      @Pawiel.99 ปีที่แล้ว

      He could update the video, shows the problems we can have and show the solutions (becasue im noob xD)

  • @jayanth2800
    @jayanth2800 12 วันที่ผ่านมา

    hey viewers im having an issue where if I run and deplete some stamina and while it is not completely but just a little or halfway depleted I try to run I am not able to run as in I'm trying to understand how to get it to deplete while I try to run while the stamina is not complete

  • @deanthedev
    @deanthedev 8 หลายเดือนก่อน

    just holding the shift also drains the stamina, even character is not running

  • @sa1fik
    @sa1fik ปีที่แล้ว

    Cool music in the background, what's it called?

  • @dartpi1436
    @dartpi1436 9 หลายเดือนก่อน

    Everything works fine, but I have a problem with footstep audio. I've been learning mostly from horror game tutorial, so I've got everything set up like in that video. But unfortunately, when I press shift to run, there 's no footsteps audio. When I walk there's no issue. Footstep sound is merged with walk animation. Did someone come up with solution? I would be grateful.

  • @radovsky3939
    @radovsky3939 4 หลายเดือนก่อน

    It's not working for me. I mean it works somehow but sometimes you can run and not lose or gain any stamina, sometimes stamina is going down but im not running, and even if I'm not walking and just press shift stamina is going down.

  • @Bio_GD
    @Bio_GD 2 ปีที่แล้ว +2

    can you please help if you don't use all your stamina and start running again then he won't run how to fix it

    • @Bio_GD
      @Bio_GD 2 ปีที่แล้ว +1

      And when I use W without shift stamina decreases. Please, help to fix this

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว +1

      Make sure to set your "canIncreaseStamina?" boolean back to true after subtracting stamina

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว +1

      @@Bio_GD Hmm, add a boolean that enables when you are holding shift and disables when not holding. And in Decrease Stamina event add a bracn at the beginning and if the boolean is true continue.

    • @Bio_GD
      @Bio_GD 2 ปีที่แล้ว +1

      Thank you! I will try it

    • @Enderking394
      @Enderking394 ปีที่แล้ว

      @@GorkaGameshow do I do this

  • @hype._.
    @hype._. ปีที่แล้ว

    Thanks :)

  • @MercGT63s
    @MercGT63s ปีที่แล้ว

    @Gorka Games i can only run when my stamina is at full how can i fix it? ive searched in the comment and try what other people said but still doesnt work

  • @c0nsumption
    @c0nsumption ปีที่แล้ว +1

    Amazing videos

  • @islandonlinenews
    @islandonlinenews ปีที่แล้ว

    how do I start with a different key like "R" instead of left shift? thanks.

    • @Tommyboi7566
      @Tommyboi7566 ปีที่แล้ว

      All you have to do is left click and type the key you want in your case R then look for R keyboard or something like that let me know if it works

  • @Cammandokid
    @Cammandokid 7 หลายเดือนก่อน

    I was adding this to an existing project with an advanced input action and im having issues where the string will not print while
    I hold shift but when I let go of shift it will print the string a single time.

    • @AnanasGamingFN1234
      @AnanasGamingFN1234 23 วันที่ผ่านมา

      I had the same issue but instead of creating an input mapping i just used the "Shift key" just like he did in the video and it worked.

  • @AxeDas-n3t
    @AxeDas-n3t 10 หลายเดือนก่อน +1

    How do you get the use stamina blueprint it doesn't show up for me

    • @TuanLeSanhHoang
      @TuanLeSanhHoang 10 หลายเดือนก่อน

      2:05 here my man!! watching carefully :3

    • @MrPlugPod
      @MrPlugPod 5 หลายเดือนก่อน

      He named the event 'use stamina' check what you named yours. I had the same issue but remembered I named mine 'Drain Stamina' Hope this helps :)

  • @llamaking0868
    @llamaking0868 10 หลายเดือนก่อน

    I know this an old video. Can you tell me how to make it so it wont consume stamina if I'm crouching? In my character i have a simple "key bind" > crouch/uncrouch. and have can character crouch checked to true.
    Additionally, is there a way to allow to sprint once more if it reaches a certain value of stamina, but to stop increasing stamina if I choose to sprint once more?

    • @ethanthengineer
      @ethanthengineer 8 หลายเดือนก่อน

      just basically add a branch to your crouch keybind and assign the "isRunning" variable to it and if false then crouch but if not, dont enable crouch.

  • @thatonemfrayray
    @thatonemfrayray 7 หลายเดือนก่อน

    It's not regenerating when i stand still and it goes down when I just hold shift when standing still

  • @activisteady3451
    @activisteady3451 ปีที่แล้ว

    How can i add the stamina bar to my viewport, everytime i go in and move it around in the canvas it still wont appear on the screen

  • @galberger3937
    @galberger3937 6 หลายเดือนก่อน

    How to hidde the stamina bar when player is not running?

  • @markcorreia2577
    @markcorreia2577 7 หลายเดือนก่อน

    How can I make the numbers on the top left go away?

  • @Reyli88.
    @Reyli88. ปีที่แล้ว

    When you click start again until it is topped up, it throws an error, how do I fix it?

  • @Enderking394
    @Enderking394 ปีที่แล้ว

    How do I make the character animation faster so it look like I’m sprinting

  • @LungaProMecha
    @LungaProMecha 6 หลายเดือนก่อน

    Anyone having problems setting the “Use Stamina Node.” It connects to the Retriggable delay?

  • @Yeloster
    @Yeloster 8 หลายเดือนก่อน

    I have a problem when i use all my stamina and stop running after i regain stamina and sprint it doesnt go back down ANY FIXES?

    • @GrimeTimeGamer
      @GrimeTimeGamer 8 หลายเดือนก่อน

      Retrace your "StopFillStamina" and "isRunning?" strings, make sure they are in correct order and true/false at each point. sometimes these get mixed, breaking the function.

    • @Yeloster
      @Yeloster 8 หลายเดือนก่อน +1

      ty but i fixed it lol@@GrimeTimeGamer

  • @emiiqmemes6216
    @emiiqmemes6216 11 หลายเดือนก่อน

    Now, how would I be able to replicate this?

  • @theoneoverseeraotoariseoft6549
    @theoneoverseeraotoariseoft6549 ปีที่แล้ว

    after following the tutorial, i have ran in an issue, the stamina bar only decreases every time it is pressed by the set decrease value once, and then immediately goes back to full, anyone have any idea how to fix this?

  • @name_isme3245
    @name_isme3245 8 หลายเดือนก่อน

    when i reach 0 stamina then spam the sprint key it allows the stamina to go into the negitives, when sprinting after the regen starts it still regens, and when pressing sprint and standing still it still drains stamina. any fixes would be apreciated.

    • @chiwaka0357
      @chiwaka0357 8 หลายเดือนก่อน +1

      in the drainStamina custom event, use the node Clamp (float) after the get stamina, and change the ranges that you want (im using min: 0 and max: 100)

    • @name_isme3245
      @name_isme3245 8 หลายเดือนก่อน

      This worked thanks.

    • @chiwaka0357
      @chiwaka0357 8 หลายเดือนก่อน

      your Welcome!! @@name_isme3245 😄

  • @twintek1099
    @twintek1099 ปีที่แล้ว

    When i sprint and turn... sometimes... the player goes all glitchy and turns in spikey, sudden impliments.

  • @XtraSleepy
    @XtraSleepy 7 หลายเดือนก่อน

    I think I'm too late but for some reason my stamina bar just won't drain

  • @LazyAnimations69
    @LazyAnimations69 ปีที่แล้ว

    My stamina bar doesn't fill up when i release shift midway, it only does after the bar is empty and when i let if fill, it doesn't get empty when i run

    • @Losmhi
      @Losmhi 10 หลายเดือนก่อน

      SAME, DID U FIND FIX??

  • @DzilalAd-Deen
    @DzilalAd-Deen 4 หลายเดือนก่อน

    HELPPPPPP..... I can't make two begin plays because one is already used in the Add Input Thingy. I can't move if I use it for the other one and I can't use the bar If Its connected to the other one. Pleeeasseee

    • @TwiggyM1
      @TwiggyM1 4 หลายเดือนก่อน

      just carry on after whatever code you used on begin play itll just run

    • @TwiggyM1
      @TwiggyM1 3 หลายเดือนก่อน

      or create a sequence node and attach it on 2

  • @mdshahidulislam138
    @mdshahidulislam138 ปีที่แล้ว

    Bro ,Can you or anyone reading this comment ,Why he used Retriggerable delay node made that loop

  • @ExxoAlbert
    @ExxoAlbert 6 หลายเดือนก่อน +1

    how I get the "Use Stamina"?

    • @MrPlugPod
      @MrPlugPod 5 หลายเดือนก่อน +1

      He named the event 'use stamina' check what you named yours. I had the same issue but remembered I named mine 'Drain Stamina' Hope this helps :)

    • @ExxoAlbert
      @ExxoAlbert 6 วันที่ผ่านมา

      @@MrPlugPod thx

  • @yukseltekbas4991
    @yukseltekbas4991 หลายเดือนก่อน

    Hello i want to uwe that fr another skills howcan i link this stamina

  • @Losmhi
    @Losmhi 6 หลายเดือนก่อน

    Hi, if someone have problem if your stamina regenerates while running i have a solution.
    After branch inregen stamina on false add new branch with boolean is running, false Can incrise stamina yes, true can incrise stamina no. I hope it helps, ALSO I DID IT ALONE IM SO PROUD OF MYSELF

  • @Ower2525
    @Ower2525 8 หลายเดือนก่อน

    i have an problem, it does not regenerate (i am in first person)

  • @oofmanoofguy4494
    @oofmanoofguy4494 8 หลายเดือนก่อน

    dude for 5.3 the event beginplay is already in action thats the thing

  • @WM_Plays
    @WM_Plays ปีที่แล้ว +1

    Can you show how to make it so you lose stamina when you jump?

    • @GorkaGames
      @GorkaGames  ปีที่แล้ว +1

      Yeah, you will need to create an event exact as the drain stamina but have a higher value on decreasing. And then when you call the input to jump, you call that function

    • @OdyGonzales
      @OdyGonzales ปีที่แล้ว

      @@GorkaGames Hi Gorka, I tried to make this work. So when my Character is Moving in any direction while jumping, it decreases the Stamina I believed that's because of the Velocity and Vector length. but the problem I have is that when I hold the Jump, It continues to jump but doesn't decrease the stamina.

    • @TannerHinzeFitness
      @TannerHinzeFitness 8 วันที่ผ่านมา

      @@OdyGonzales might be too late but you could try using a do once node on your jump function to prevent multiple jumps while holding the jump key

  • @CostaGeo6683
    @CostaGeo6683 2 ปีที่แล้ว +1

    Your literally writing my mechanics 😂

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว

      🤣 yeah I just realized 🤣

    • @CostaGeo6683
      @CostaGeo6683 2 ปีที่แล้ว +1

      @@GorkaGames I’m definitely not complaining 😂😂! I can probably do all the mechs prior to making the environment though

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว +1

      @@CostaGeo6683 yeah 🤣🤣 that is actually the "right way" to start, first doing all the main mechanics than the enviroment

    • @CostaGeo6683
      @CostaGeo6683 2 ปีที่แล้ว +1

      @@GorkaGames that’s actually some good advice to know, Iv been stressing over the landscape for weeks. We know where it’ll be, we know how we want it to look but none of us have a powerful enough machine to make it 🫣! Appreciate your replying and advising bud 💚

    • @GorkaGames
      @GorkaGames  2 ปีที่แล้ว

      @@CostaGeo6683 no problem man! I am here to help, also if making the landscape inside UE is too performance expensive for your machine you could try to make it in a 3rd party application, suchas "Houdini" or "WorldMachine", and then export it to UE.