How to Set up Health and Damage System - Unreal Engine 5 Tutorial

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

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

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

    Get my 4K high-quality courses on gameinstruct.com/
    Also available on Udemy 30-85% off this month:
    How to Make a FPS Game - Unreal Engine 5 Multiplayer (2024)
    www.udemy.com/course/ue5-multiplayer-fps/?couponCode=SUMSAL
    How to Make a 2D Clicker Game - Unreal Engine 5 (2024)
    www.udemy.com/course/make-a-2d-idle-clicker-game-unreal-engine-5-blueprint/?couponCode=SUMSAL
    Unreal Engine 5: Develop Your First Two Games
    www.udemy.com/course/ue5-twogames/?couponCode=SUMSAL
    Unreal Engine 5 for Beginners - The Complete Course (2024)
    www.udemy.com/course/ue5-beginner/?couponCode=SUMSAL
    Unreal Engine 5: Blueprints for Beginners
    www.udemy.com/course/unreal-engine-5-blueprints/?couponCode=SUMSAL
    How to Add Steam Multiplayer: Unreal Engine 5 Blueprint (2024)
    www.udemy.com/course/how-to-add-steam-multiplayer-unreal-engine-5-blueprint/?couponCode=SUMSAL
    How to Publish a Game on Steam - Unreal Engine 5 (2024)
    www.udemy.com/course/ue5-steam/?couponCode=SUMSAL
    Simple Inventory System - Unreal Engine 5 Multiplayer (2024)
    www.udemy.com/course/ue5-multiplayer-inventory/?couponCode=SUMSAL
    Unreal Engine 5: Complete Lighting Guide for Beginners
    www.udemy.com/course/ue5-lighting/?couponCode=SUMSAL
    Be sure to subscribe to our TH-cam Channel for actionable Unreal Engine 5 beginner tutorials:
    th-cam.com/users/PixelHelmet

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

    Fantastic tutorial ! Clear, easy to follow, straight to the point and I actually learned a lot about the blueprints connections !

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

    Holly! I'm new on Unreal world and this tutorial unlock a new level! I love it!

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

    You are amazing. So thorough in your explanations of each action, makes it easy to not only see what you're doing, but to actually learn why and remember the process easier. Another one of those videos where I have wished I could click that like button more than 10 times throughout the watch.
    tysm!!

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

    Thanks Nafei! its great and so helpful. The way you explain your courses are simple and easy to follow. Great work!! :)

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

      Thank you for the kind words Michelle. And thanks back to you for all the support!

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

    Hey man great tutorial, explained it to perfection

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

      Thank you very much for the nice words.

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

    Thanks buddy. Big help!

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

    Very helpful thank you 👍

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

    Thank you brother

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

    Wow that tutorial was very clear and concise thank you!

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

    Amazing explanation, thank you! :D

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

    Thanks for the great tutorial, I just have one question: how can I implement the logic to increase the life? (In my case I am creating an Actor Blueprint of a heart).

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

    This was so pleasefull to watch, no stuttering voice, and a very very clear to follow instructions, thank you.
    if you have such clarity even in the purchasable course, I can't help but be tempted to buy it.

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

    Thanks for the tutorial, works great

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

    I was trying to do this in unreal engine 4, and it worked out good, until I had to use the quickly add to the project button, which apparently doesn't exist in UE4

  • @faltaintgaming
    @faltaintgaming 9 หลายเดือนก่อน +1

    Greetings, I want to say a great tutorial. Very helpful and informative.
    I have followed it as much as i could and implemented it in my own blueprint. It works but every time i stop running the game i get the error: Blueprint Runtime Error: "Accessed None trying to read property UI_Player". Node: Set Health Bar Info Graph: EventGraph Function: Execute Ubergraph BP Player Controller Blueprint: BP_PlayerController .
    Has anyone else come a cross a similar issue?

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

    Thank you so much, it helped me a lot... The only thing missing is a way of gain health back.

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

    how do i make it that when the player dies, the screen goes "game over"?

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

    quick question i have everything working fine for the hp/damage system up until the last bit of the video that kills the player i have followed this guide and the code matches up but nothing happens when hp reaches 0? i am using the default third person character which has default code attached to it that enables movement one of those lines of code uses the "Event begin play" for controller mapping. so i couldn't make a new "Event Begin play" to match your line of code exactly any help/tips please?

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

    Great tutorial! Do you have any example on how to quit game when the damage reaches zero? And also how to replenish health when entering a box?

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

      Hi Kimboor, I’ll make a tutorial very soon on healing as well.

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

    Every I exit the level editor it gives me an error saying "Accessed none trying to read property WB_Main" any idea on where I went wrong?

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

      Accessed none means that you defined the variable in a wrong way. It can’t find any information inside of that variable. Try to take a look at where you created that widget and how you defined the variable. The mistake should be there.

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

    thanks it was helpful

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

    Just a quick question!
    Do I have to create the BP Character Controller or can I just do all of this in the already made BP Third Person Character? Thanks!

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

      Hi Nislaav, you can do it in the already-existing BP Third Person Character.

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

    I cant get it to lose health at a steady rate, it goes from 100 to 0 directly and when I get close again it gives me 1 health. HELP

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

      Same. Did you ever figure the problem out?

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

      @@garyyates2592 Yes, I put the values on the wrong order and It kept subtracting everything all of a sudden. Make sure you put the number you are subtracting second

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

      @@olbap2014 I figured it out. Thanks!

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

      @@garyyates2592 hey whats the solution have the same problem

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

      ok now i get it you have to change the "EventAnyDamage" in the second slot of the subtraction .. so its current health - damage

  • @mr.kubitea
    @mr.kubitea 7 หลายเดือนก่อน +1

    controller thing doesn't even allow player to move camera or move in directions bruh

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

      Just add the create WB Main widget after the Add Mapping Context in the existing template. UE5 did a change and added that to the default controller.

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

    Does not work on 5.1.1 because there the control goes through the begin play and it can be called only once in one blueprint

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

      Hi, it works in 5.1.1. Can you please explain the issue and I might be able to help. Thank you.

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

      Nevermind, just need sequence node

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

      @@PixelHelmet The fact is that the standard thirdperson blueprint already uses the beginplay node, and in one blueprint it cannot be used twice, so I had to use the sequence node in order for the startplay to work in the logic from your video, so everything works, sorry about my words :D

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

      @@PixelHelmet Really very useful tutorial thanks

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

      @@PixelHelmet If possible, could you also make a tutorial on gaining experience and levels player?

  • @PaulaSilva-nq1uq
    @PaulaSilva-nq1uq ปีที่แล้ว

    Thanks a lot for this tutorial, i cannot download the game assets ( 4 color squares) , do you have an alternative link for downloading? ty

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

    Can use progress bars too no?

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

    I hate trying to learn game development. I know it's hard, I know there's adversity to overcome. But every time I think I'm making progress something genuinely insurmountable appears, and when I say insurmountable, I mean completely and utterly incontrovertibly FUCKED. I must have forgot to install the perfect magical version of UE5 where shit actually gets done, because I find myself struggling against jittery tilesets, essential features disappearing, the engine somehow warping reality to work completely differently from other people's experience, and the complete lack of care Paper2D has received from Epic Games. I have genuinely wasted hours upon hours of my life sitting at a computer, looking up fixes for issues I couldn't solve with logic or reasoning, but don't worry. I don't expect anyone to care, it's obviously just a 'me problem'. My life is fucking meaningless.

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

    how can add animation death when health bar get zero 🥺🧐

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

    got it all done and it crashed when I clicked save

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

    ok but where did those images come from?
    I seriously don't know what I'm meant to look up here.

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

      Hi, If you're referring to the custom UI images, it's something I made custom in Photoshop. I've uploaded them for you in the video description (Link to google drive).

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

    thanks for a great tutorial! got a sub! would this the same logic that we done here work if i wanted to add a bullet widget? i would just put some logic in the bp character bp? thanks

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

      Thank you very much! Yes you can do that. Just add that code inside of the BP_Player blueprint we made and it should work.

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

    The Target in the Controller in UE5.1 doesn't work. I have delete all and remake it twice and it still not work.

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

      I can confirm this works in ue5.1 latest version as of 1/21/2023. It appears a step might have been missed here

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

      if you havent fixed i found that under variables the get UI pin type was not set the widget blueprint previously made

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

    Is not on Ability System :( so is not correct, how to do this

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

    It does not work with first person because i cant have 2 begin on play events

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

      You can extend this to the original begin play, if it gets messy select the code and collapse to function

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

      use a sequencer node

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

    how can i hide the HP UI on another level?

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

      Remove From Parent on Event Begin Play of the level itself I'd imagine

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

    Hi ,thanks for wonderfull Tuto, I just have one question/problem, apparently in not able to get the "set Percent" (native function ?) that you use in the event Graph of your WP_Main... I'm not able to understand why.... Any idea ?

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

      You might be referencing an object which has a different workflow to get the same result. You need to make sure Progress Bar is selected and that it Is variable

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

    I DONT WANT TO USE PAIN VOLUME 😂, tell me how to make an enemy that damage the player

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

    Help please

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

    My hp goes from 100 to 0

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

      Same. Did you ever figure out why?

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

      1. Make sure the Max Health Variable is set to 100 and make sure the damage volume is set as 10-90 or something but also it seems you might have plugged Max Health and confused it with Current Health

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

    damage is cost of upgrading hardware to use unreal 5
    good health is not doing it and staying on 4

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

    oh and everyone zoom in to the feet on this third person character and notice its not even flat to surface
    aint that pro

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

      V helpful, thanks.

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

      @@hxrdwired
      construction stuff , even major couriers at one time were mob owned

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

    Fantastic tutorial, I like how you took the time to explain exactly what each node was doing and how/why everything connected. I learnt a lot from this! Thank you!

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

    Nothing happens when HP drops to zero

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

    I cant create a "event begin play" because it already exists how can i do it please help

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

      You can use something called "Sequence" and plug it on each.

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

    Great tutorial! Very well paced. Looking forward to more.

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

      I appreciate you, Sileff. Thank you for the encouragement!

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

    hey got evrything to work but the death won't work. Did it on first person mode.

  • @Ewen-bd2co
    @Ewen-bd2co 6 หลายเดือนก่อน

    merci pour cette incroyable vidéo
    J'ai laché mon like

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

    so now when i have the health plus in my level, how do i make it raise my health when i pick it up?

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

    Ok so ive just completed this tutorial and it mostly works except for some reason either the value of the Current Health or Max Health aren't being set. I've made both of their default values be 100 but whenever I start the game it just defaults to 0. Ive even tried manually setting the values to start at 100 and it doesnt work. Any help?

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

      Ok not sure what the issue was but i started with a fresh project and did this tutorial and it works.

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

    Such an inspirational video this is.

  • @TheNacht
    @TheNacht 11 หลายเดือนก่อน +1

    I cant get the character to move after I made all the nodes idk what I did wrong

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

      If you're doing the First Person template, you want to add "Create WB Main UI Widget" after the "Add Mapping Context" on the existing Player Controller for the template. The First Person Controller needs that blueprint to enable mouselook etc.

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

    I get this odd error that it says "none to read MB main: on the update health module, any recommendations?

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

      Fixed the read error by placing in an is valid prompt, however now only thing left is getting the text to update properly after respawn . Currently it's staying at 0 after death. (BTW, I loved this video this is amazing help I'm just new lol)

  • @noorn.1981
    @noorn.1981 2 ปีที่แล้ว +1

    Great explanation 👏

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

    Thank you for such a great tutorial! So much useful information explained in such a clear way : )

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

    Hey this is an awesome tutorial, but I’ve been trying to find someone to help me out with this 1 thing. I can’t find it anywhere so maybe you can point me in the right direction. How do I add an armor bar over the health bar so that it (armor bar) takes damage first before the health bar? I would greatly appreciate your help…

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

      I’ll make a tutorial about this asap.

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

      @@PixelHelmet yesss! Can’t wait!!

  • @Retro-xf9jb
    @Retro-xf9jb ปีที่แล้ว

    Hi sorry to be a bother I think I did everything correctly I connected it all and Have double checked it like 3 times, but the health number isn't updating on the UI and I don't know what I did wrong any ideas? sorry again.

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

    idk if UE has updated since this video, but I'm currently trying to do this, and I'm at the point where you're saying to add "event begin play" at 24:11, and I've got an "add input mapping" that you don't have in the 3rd person blueprint, and it is using "event begin play" and it's not letting me add another one, any advice?

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

      Hi Alter, yes it has been updated since. You just add the code after the Add Input Mapping. Just continue the code, that's all fine. You can only have one Begin Play event in a blueprint.

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

    This was very helpful but could you please make a tutorial on how to add an animation of how the player dies and then teleports him

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

    best health/dmg tutorial video

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

    Awesome video, It helped me in my project

  • @raw2wmobile.legends773
    @raw2wmobile.legends773 ปีที่แล้ว

    trying to do this but apparently it doesnt work when making a server multiplayer game. Any fixes? i get errors unless i use custom event but than health bar doesnt show

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

      it's always an option in details but what you're looking for is Replication in the details panel

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

    so im trying to make a shield and health bar work together, think you can push me in the right direction? also ty for tut i learned alot just what im trying to do is more complex to me

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

      Hi Kaze. For armor, you can use the same method as the health with another float variable called Armor, Max Armor and so on. And if you get hit, you can calculate the lost armor depending on how much damage you receive from the AnyDamage event for example.

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

    Hi.
    when my character life point will hit 50 i want the health color bar to change from green to red how to do that?

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

      You would set this up using a curve! It's a bit more advanced but just search in YT Changing Color of health bar using Curves.

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

    I loved this tutorial, it has served me well.

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

    can anyone help please it only allows me to add booleons in the widgit blueprint

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

      To the left under variables, you should be able to swap from Bool to Integer or anything else you may need (Float in this case)

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

    Great Tutorial, but around 20min Mark, it just gets bit confusing and your going to fast, i have had to watch three times to figure which window your in and jumping between the screens is utterly confusing

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

      Also WB Main is not compatible with SethealthbarInfo

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

      I agree, he has weird pacing which is hard to follow. It should be the effective window and explaining WHERE you can check it. If WB main is not compatible, look at variables and change the type to the correct Float value