Component Based Health System with Event Dispatchers in Unreal 5

Поділитися
Вставка
  • Опубліковано 15 жов 2024

КОМЕНТАРІ • 14

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

    Man I love these videos...

  • @EMBakie
    @EMBakie 3 місяці тому

    Great tutorial! Is there a way to get the percentage to the health bar without using a bind? I try to do it by just getting the percentage through a variable but can never get the progress bar to show up on the list.
    Edit: neverminded! I jumped the gun and didn't watch it all the way though, but I guess what I'm trying to do with it is going to require me to do more research.

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

    Great content as always.
    I've heard folk criticize the built-in damage system, though I fail to recall precise context.
    Any issues or shortcomings in your opinion; reason(s) to avoid and build your own?

    • @acdev7027
      @acdev7027  9 місяців тому +1

      I think the built in Damage system is fine for most simple action games. I just use it for sending the initial Damage event calls, which I would build anyways if it wasn't already there. It's not very complex, but it doesn't need to be... I mainly just use it as an entry point and build extra complexity myself if needed.

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

      @acdev7027 my project is a simulator. grounded aesthetic- nothing fantastical. appropriate use-case?
      Do you know of any specific circumstances which would lead one to avoid it?

    • @acdev7027
      @acdev7027  9 місяців тому +1

      @@elganzandere For the Health system from this tutorial? Yes, this system is really basic and just gives you a starting point for a health resource and something happenign when you run out. Most games need some form of 'hp' and something that happens when the thing runs out of hp. This one's built in a way that you can extend it later. If you're talking about Unreal's Damage system, then yeah, it's so simple that if it's all you need great, and if not you can build on top of it.

  • @laurenttelmosse3375
    @laurenttelmosse3375 2 місяці тому

    at 38:21 why not use the event "On Took Damage" in the details panel of your health component? is there a reason we have to bind ?

    • @metalac190
      @metalac190 2 місяці тому

      It's been awhile so I'm not positive, but I think it's because I want to hook into a custom Killed event, not a general OnDamaged event. I was prob showing different ways to hook into events throughout the video

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

    great health system, however I can't see any health on the healthbar when I play the game. I did not put the Healthbar on my character, I placed it on an actor (Static mesh Object: in a blueprint class as an actor) in my game. The widget appears fine but no health is displayed on the widget when i begin to play. Do i have to do some casting? or does the health widget not work on actors?

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

    I’m building a melee component. What would be a reason for me to use a function instead of a custom event if any?

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

      there's probably a performance impact, but not significant enough for me to notice in my projects. I mainly use functions to hide away things to keep my graph clean for flow type stuff. I will say that events play nicer with most of BP's nodes, compared to functions from what I've seen

  • @guilhermerover7296
    @guilhermerover7296 5 місяців тому

    Can you please teach how to make a health bar for 2 or more playable actors? For example like Final Fantasy 7 Remake, that game has multiple playable character health bar in the Viewport.

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

    Great tutorial. But I cannot seem to figure out how to add in functionality for a healing event. I tried using a reverse damage, but that seems problematic and it doesn't seem quite like how it was intended to work with this system. This only seems to teach you to how to make an actor take damage instead of gaining health.

    • @acdev7027
      @acdev7027  7 місяців тому +2

      For healing, its best to use a separate Function for it (Heal(amount)) rather than try to do negative damage. Since healing isnt built into the damage system, youd need to either search the actor for the health component -> Heal, or even better, youd make a BPInterface (IHealable) with a Heal function, implement on Health component, then send the Heal message to the thing you want to heal. Either would work, though the second option is more flexible and easier to use if you can understand interfaces. Hope this helps a little bit.