How To Create Enemy Health Bars in Unreal Engine 5

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

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

  • @guillermofleitaspulido
    @guillermofleitaspulido ปีที่แล้ว +44

    Hi developers! If you followed this tutorial and your health bar is not changing the problem is here 6:08 you need to add a percent node between the health variable and the return node like in this video th-cam.com/video/BpTKS5-9KnE/w-d-xo.html&ab_channel=MattAspland - (3:35) its because the health bar dont go from 100 to 0, it goes from 1 to 0 so you need a float value. This is not a critique i'm just trying to help others. Bye and good luck !

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

      Un-sung hero legit

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

      Thank you for the amazing advice, I had already rewatched the video 4 time trying to see where I went wrong. Thank you.

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

      @@kiritouzumaki6669 it's a pleasure to help ! :D

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

      @prestonroman You are welcome :D !!

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

      Dude thank you so much! I had been struggling for hours trying to figure out where I went wrong, I should have just looked at the comment section a lot sooner, haha!

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

    Who else got bamboozled by the cool looking health bar in thumbnail?

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

    Interesting that you have a BIND on the progress bar. Did you know that if you put a Print String on that binding function, you will be spammed with whatever is in the Print String? Every Tick. It updates that health bar every tick. You should use an Event Dispatcher in the UpdateHealth function so that it tells the widget to update the amount.

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

      either that or make it event based, where the damage event calls an event to update the health bar

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

      We're actually planning on making a second version of this which is more advanced functionality which is more streamlined. That being converting this existing system to be event based and hide when the player is a certain distance away.

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

      @@VirtusEdu im interested in that one

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

      @@VirtusEdu It's been about 4 months. Do you have a timeline for when you are going to create the more advanced implementation?

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

    Regarding anchors: You can choose an anchor and automatically move all selected items by holding ctrl+shift while clicking the anchor you want, saving you some eyeballing.

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

    Nice clear tutorial. Except one change is suggested to note... to make this work Multiplayer. Instead of creating the Function to update your health, set your Pawn's Health variable to RepNotify. Then put all the same script in the RepNotify function created automatically. Then the enemy health bar will be replicated to other players. Thanks for everything here!

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

    for anchoring things to where ever if you hold CTRL + Shift when you press the anchor option itll auto move the thing to that exact location

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

    This is so clear. Thank you for the video, love it.

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

      You're welcome bro

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

    There are tons of such healthbar instructions in TH-cam and everyone do this ugly looking healthbar, which has same size at any distance to character...

  • @CodySmith-ci8hn
    @CodySmith-ci8hn ปีที่แล้ว +1

    Question, how would I be able to implement this onto the top of the FPS player's HUD instead of above the enemies head? For instance, a player shoots another player in multiplayer indicating that users ID name, health and any armor they may have on? Thanks.

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

    The health bar is never occluded if you use screen space.

  • @Ash-qp3tr
    @Ash-qp3tr 6 หลายเดือนก่อน

    How can I toggle the visability of Health Bar on Canvas? Because I have two on my UI, above character and one I've made on canvas

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

    Very good video. Good explaining. Thank you

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

    Doesn't work, the variable doesn't display the health for the bar in the widget.
    edit: The reason it wasn't display is because you need to put 7.5 as opposed to 75 in the video. Fixed the display issue for me.

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

    The small things i REALLY like about UE, i dont even have the bind dropdown next to the percentage? wtf

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

    Are you using health bars like this in your games? I want to know!

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

      yaah but i used to your health bar from old video of your's

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

      Yes

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

      PLZ do a tutorial about the Health bar in the world space(and always face to the camera) rather than screen space because HP bar in screen space will display even it was blocked by other object and it's very weird in 3D Action game.

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

    Yo man. Idk why but my healthbar is blurry af. how fix men

  • @Aditya-us1qn
    @Aditya-us1qn ปีที่แล้ว

    Thank you!

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

    is there any way we can show the health bar numbers while we damage the enemy?

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

      if i understand what you mean you can add a text to the widget saying the total number of health they have but in the graph the same way you do the progress basically, just add the text component and set the text to be the health...i think?

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

    Does this widget updated every tick ?

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

    Thank you for the video

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

    would this replicate on mulitplayer?

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

    Do you know how to make a character stop for a moment when picking up an item, then the character plays an animation, then gets them to move again. I almost got it working.

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

      on press 'action' set movement speed 0. play animation ?

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

      When picking up the item set the player's max walk speed to 0 or something very low according to your need. Then play the animation and on animation end reset the player's max walk speed

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

      @@EyeNeo It works, expect not quite the way expected. I was trying to go with a sort of Super Mario vibe, like how he gets a star or moon, with Mario's stood in place does an animation and moves again.
      I do like how I'm able to move now and my character isn't human.

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

      @@MartKart8 You should be able to just use a root motion montage, no need for any extra coding. Movement will be disabled while montage is playing and return when it is finished.

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

      @@augustforever7198 Thank you so much, this works exactly how I needed it to. Just went and made the animation slightly longer as it ended too quickly.

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

    Hi, Im very new in here, and I really like the way you explain all these features in Ureal.
    For this video, I couldn't make the health bar running with the variable.
    I used "Print String - Variable" to check on the variable alternated, when the ThirdPersonPlayer touch the DummyTest, the variable of "Health" did decrease and also in the function which bond to the progress bar kept showing the changed variable which means function works fine.
    Also, when i change the value in the variable "Health", the health bar didn't change at all, it keeps on full till the value is 0, then the health bar became empty.
    I have went through this video and remade the project couple times, still got same issue.
    Is there anyone can help me? >_

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

      Should I do any code inside the Event Graph of the WB_HealthBar widget?

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

      Hey Yoyo, if you need help with this make sure to join our discord, there are channels for troubleshooting and I can walk you through a lot of your code on there

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

      @@VirtusEdu Thank You very much!!
      I will try to join later! really appreciate it!

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

    The quality of the video is 360p. Please re-upload with 4K or 1080p

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

      IIRC, TH-cam will upload the lowest res first when released and then do the others after. So the higher res are technically already uploaded you may just have to wait

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

      The video is in 4K resolution, enjoy!

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

    bro next time use 10000000000000x100000000000000 monitor pls i cant see anything amk

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

    keep the good work

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

      Thank you, I'm glad that you enjoyed it!