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

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ • 119

  • @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 UA-cam Channel for actionable Unreal Engine 5 beginner tutorials:
    ua-cam.com/users/PixelHelmet

  • @CaspiannDev
    @CaspiannDev 6 місяців тому +1

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

  • @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!

  • @TIAGOBEZERRA999
    @TIAGOBEZERRA999 2 роки тому +4

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

  • @0handsgg566
    @0handsgg566 Рік тому +1

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

  • @Fizziepop
    @Fizziepop 9 місяців тому

    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!!

  • @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!

  • @lisowiligas1524
    @lisowiligas1524 Рік тому +1

    Hey man great tutorial, explained it to perfection

    • @PixelHelmet
      @PixelHelmet  Рік тому

      Thank you very much for the nice words.

  • @AhmadNafa
    @AhmadNafa Рік тому +1

    Such an inspirational video this is.

  • @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!

  • @paulshelkov7956
    @paulshelkov7956 Рік тому +1

    Thanks buddy. Big help!

  • @stathiszoulakis9599
    @stathiszoulakis9599 10 місяців тому

    best health/dmg tutorial video

  • @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.

  • @bigbasbeardegummiland2756
    @bigbasbeardegummiland2756 Рік тому

    Wow that tutorial was very clear and concise thank you!

  • @animefanime11
    @animefanime11 Рік тому

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

  • @Idenerooz
    @Idenerooz 2 роки тому

    I loved this tutorial, it has served me well.

  • @BhavinMachhiX
    @BhavinMachhiX 2 роки тому

    Awesome video, It helped me in my project

  • @noorn.1981
    @noorn.1981 2 роки тому +1

    Great explanation 👏

  • @unrealhabitat
    @unrealhabitat Рік тому

    Amazing explanation, thank you! :D

  • @Lacrete74
    @Lacrete74 2 роки тому

    Thanks for the tutorial, works great

  • @PumpNFI
    @PumpNFI 2 роки тому +2

    Very helpful thank you 👍

  • @osio0000
    @osio0000 2 роки тому +1

    Thank you brother

  • @FzTazer
    @FzTazer 9 місяців тому

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

  • @matteocamboni3572
    @matteocamboni3572 7 місяців тому

    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).

  • @dnajlwosqkdasjczdbkahdwcs
    @dnajlwosqkdasjczdbkahdwcs 10 місяців тому +3

    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.

  • @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.

  • @unflameble1197
    @unflameble1197 2 роки тому

    thanks it was helpful

  • @faltaintgaming
    @faltaintgaming Рік тому +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?

  • @Yacob_Rl
    @Yacob_Rl 6 місяців тому

    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?

  • @cadenhole
    @cadenhole Рік тому +1

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

  • @inkinn8587
    @inkinn8587 2 роки тому +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

  • @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.

  • @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.

  • @baryafe
    @baryafe 9 місяців тому

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

  • @melonadegg
    @melonadegg 2 роки тому +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  2 роки тому +1

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

  • @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

  • @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

  • @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.

  • @baryafe
    @baryafe 9 місяців тому

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

  • @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.

  • @eltwinscodm625
    @eltwinscodm625 2 роки тому

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

  • @flaffys6791
    @flaffys6791 Рік тому

    Can use progress bars too no?

  • @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.

  • @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.

  • @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!!

  • @TheNacht
    @TheNacht Рік тому +1

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

    • @Eyclonus
      @Eyclonus 8 місяців тому

      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.

  • @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.

  • @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 2 роки тому

      @@garyyates2592 hey whats the solution have the same problem

    • @YungSuz
      @YungSuz 2 роки тому +1

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

  • @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?

  • @noblestruggle108
    @noblestruggle108 11 місяців тому

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

    • @noblestruggle108
      @noblestruggle108 11 місяців тому

      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)

  • @raw2wmobile.legends773
    @raw2wmobile.legends773 2 роки тому

    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

  • @galberger3937
    @galberger3937 2 роки тому

    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.

  • @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  Рік тому +1

      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).

  • @joshcatchpole2621
    @joshcatchpole2621 2 роки тому

    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)

  • @noskir
    @noskir 2 роки тому

    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

  • @colbyfox7906
    @colbyfox7906 Рік тому

    got it all done and it crashed when I clicked save

  • @mr.kubitea
    @mr.kubitea 10 місяців тому +1

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

    • @Eyclonus
      @Eyclonus 8 місяців тому

      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.

  • @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

  • @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

  • @patrykleveldesign
    @patrykleveldesign 2 роки тому

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

  • @Sownll5980
    @Sownll5980 2 роки тому

    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

  • @KittenisKitten
    @KittenisKitten 2 роки тому +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 2 роки тому

      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

  • @Technoxia1
    @Technoxia1 8 місяців тому +1

    Nothing happens when HP drops to zero

  • @albertdiaz6599
    @albertdiaz6599 27 днів тому

    As soon as I spawn in, I die, what's going on?

  • @guystech8052
    @guystech8052 Рік тому

    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 2 роки тому

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

  • @chronosschiron
    @chronosschiron 2 роки тому

    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