Where should my HUD be placed?

So im trying to figure out where i should add my HUD viewport. Currently, its in my main character and 2 side characters BP (You can switch between characters in my project). If i have boss enemies in my game, should i just add the HUD to the level blueprint or keep it in the 3 characters blueprint?

Have the boss create widgets that belong to them.

1 Like

Level Blueprint is generally not a good place to put many elements in. I am not sure what your setup is going to be at the end but a good way can be that you create a HUD manager which adds, removes, updates UI. That way all your operations are in one place.

  1. Your options of putting it in different character is possible as well. If the UI changes on selection you, you will have to hide and show.

  2. You can put your HUD in player controller. It can be easy access as well that way and later on modify it as needed.

My personal favorite is creating manager or putting it in a place where I can send commands as to whats needed, and that manger handles all required operation. This can lead to easy debugging and flow control. And for future also allowing memory management. Hope the answer helps.

1 Like

Ok so i done this but the health bar i created for the boss enemy is updating. Would it be better for it to be a player character or pawn?

I am assuming it’s NOT updating. If you have a problem with script not working, show us the script. Or:

https://www.youtube.com/results?search_query=ue4+enemy+health+bar

Since this has been done more thoroughly that the forums could ever explain.


Would it be better for it to be a player character or pawn?

We do not know what the boss is. If you’re asking for a difference between a pawn and a character :

  • a Pawn is an actor that can be possessed and easily controlled by the player or AI
  • a character is a highly specialised Pawn, usually paired with a sophisticated movement component. It’s designed to handle bipedal movement, a skeletel mesh and support kinematic physics.

If the boss is a Laser Spewing Spaceship, it better be a Pawn. If you’re fighting King Kong, better make the ape a Character class.

alright i’m going to start up a new question that way i can show all the code and how it works but thanks you so much for the help!