UE4 - Tekken Style HP Progress Bars

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ม.ค. 2025

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

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

    Honestly, the best solution I've ever seen :) .

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

      Thank you! Glad you like it! ❤️‍🔥

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

    Amazing guide! even through time

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

    you're the best!!

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

      Thank you mate, you are the best one too and deserve a good, big, cold beer 🍻
      Thank you! ❤️‍🔥

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

    thanks ,realy great :D

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

      Thank you! Glad to hear it was something for you ^_^

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

      @@UnrealSolver yes something (not realy what searching but for sure wil help start with ..i wanted a dyanmic bar with decreasing by dots (like 000000 many small circles ) splitted and when decreasing to start dissapearing 1 or 3 or 5 depending on the amount of damage but smoodly not 3 at once kinda like this bar smoodly decrease) but yea something will help starting i supose i need only the bar design and figure out how to decrease those separate dots :))))

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

      For a Circular Progress Bar check out this tutorial from one of my favourite Channels: th-cam.com/video/9NtSfPq95fQ/w-d-xo.html
      The delayed vanishing will be very similar to what I show on this video - you will still need 2 Progress Bars where one will make the vanish effect (blinking, changing color or whatever you like) and the main one will decrease instantly :)

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

      @@UnrealSolver ohh not circular :D ....the bar to be in a straight line just like yours but inside the bar line to be little dots and when decreasing to dissapear smoothly 1by 1 (depending on damage percentage)

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

      Oh, I see, then following: You need 2 textures - one is your bar design, the other is the mask (black/white only) - white will be the visible part, black is what will be covered - that way you can make as many dots as you want but just make sure to calculate them to make it convenient with your damage calculation so you always will have the HP clearly visible ;)
      Edit: then you make a Material out of it, make sure to make it "UI" Material (in the material itself select the default node with all parameters and in the Details you can select the texture type) then apply to your Progress Bar

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

    ...So i been trying to make this bar working and i still have issues with the red bar (canot get it to work :))) )

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

      Hi, I saw your other comment which got a bit more explanation. As it's hard to explain just in single comment I made a Project just for you that contains following functionality:
      - HUD Updates 2nd Bar for Enemies when they are in range (if not it kinda greys out) incl. their name
      - Automatically selects 'closest' enemy (not really since it makes one iteration only so it doesn't end up with closest one mostly)
      - Enemies have names and you can see target's name having sharp brackets like >NAME< as indication of being your actual target
      - Two types of damage (randomly, you just spam left mouse button to attack):
      = Normal Attack
      = Status Attack - 3 statuses with damage over time, different status and critical have different colors of the damage text
      - A little bit of damage calculation which is very basic but includes Attack and Defence power etc.
      - Uses BPI, if you don't know it yet - better learn about it asap as it's useful and cool :)
      - Has very simple but working AI that attacks you
      And some more stuff :D If you realize what is what in the Project you can modify things and see the results, you can base on my Project or copy-paste snippets or whatever you just like, hope it's gonna help you out ;)
      Made in Unreal Engine 4.27
      drive.google.com/file/d/1bSLwB2dRWj0hAyUjuikAW_HAL_LxXvG1/view?usp=drive_link

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

      @@UnrealSolver wow man ...did you just bother make this ,incredible :D but thank you verry much lol ....on the bar from this video i managed to put it on my project on enemy and on player but only updating the green ones on damage ...didnt figure out how to update the red bad unreneeth the green one :D ....wow thanks for the tweeks and i hope il figure out im interested on the bar this type like tekken style :))) ...wich was my favourite game back in the days sience tekken 3 :)) ...thank you il get intoo that project to see what can i learn from it ..:X
      you the best thank you!

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

      @@UnrealSolver Reedit: you shouldnt have it done it so complicated haha ...i never saw this damage style before (im used to event any damage and apply damage wich are more comons haha ,,, now you have me confused more :)))) il just try to implement that health bar teken style on both enemy and player see if i get it to work :D ...thank you anyways ,you dowing great work (your code seems so advanced) :D but i like the random damage feels more flexible to have more options with it than the normal 'random float in range' ! or mabe im too begginer haha

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

      for the Red Bar you need to do two things:
      1. Start the P2 HP Update Timer which is in the HUD Widget which is referenced in the Pawn so if you access Pawn you can access HUD Widget and run the Event :D
      2. Set "Timer ON" Boolean to True (or you can do it as in the Project I shared - it's in the Timer so there's no need to do it separately)
      Green bar goes instant, Red Bar is on Timer, it checks if Actual HP is greater than Last Known HP and if not - make it shorter to finally fit the green bar size

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

      Haha, yeah, maybe it's a bit much for the first sight but it's a pretty full example of usage of such System
      the Damage System is basically a BPI, as well there's a 2nd BPI for providing some values from Enemy to the HUD
      The convenience of BPI is that you can try to call it on any Actor and if he doesn't have it implemented (or the Function you try to call) he's not gonna do anything and no errors would happen, but if Actor implements this BPI it will run this Function(Message) and do the appropriate code
      To visualize it - imagine having a horde of people, some have bows, some have swords
      If you scream "Attack" - archers and knights would reply differently
      If you scream "Shoot your bow" - only archers will reply, knight would not have this Function implemented and so he will not respond even if you shout to everyone
      I hope that makes sense and this is what's happening with the Damage :P It simply informs that "hey, if you have the Damage BPI implemented then do the Default Damage or (randomly) Status Damage now!" without the need to Cast anywhere
      You will also see the "Does implement interface?" node within the code
      So basically if you follow my video and instead of Casting to MyEnemy - you can create and implement BPI and call any Function you created there on the enemy you're facing and affect only his own HP
      Also check the Function for "checking for enemies around" - there's the enemy reference variable being saved (variable type is Actor) and the Attack Custom Event :P

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

    Hey, Great tutorial there!
    How do I update my current health variable to previous health variable while receiving damage?

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

      Thank you :)
      As per video - there's a Variable called "last known HP" but it's being changed when the timer starts for the red Progress Bar so you may need an additional Variable, call it for example "Previous HP", when a Player gets a hit - Set Previous HP to Actual HP, then change Actual HP to the calculation after damage and so you have your previous HP stored and unaffected until you get another hit, and so you can use this Variable to update your health to this value :)
      Hope that makes sense :D

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

    can you make widget screen for a computer

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

      Can you specify, please? I am not sure what do you mean with “widget for a computer” ;)

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

      but more professional

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

    god bless you , thanks💐

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

      Glad to hear it was something just for you ❤️‍🔥

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

    I like it!

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

      Nice to hear that mate! ❤️‍🔥