Difficulties Implemnting UI

Hello,Recently I followed a tutorial on Damage System(By Ali Elzoheiry https://www.youtube.com/watch?v=o3uFXnNxwKE&ab_channel=AliElzoheiry very good one I recommend for those who need help understanding how a damage system works)

And im having trouble updating my UI such as health,stamina,etc.

previously i had everything in my level blueprint(Game mechanics, rules of the game,Hud and some of the controllers), But I did some research and I understood that its best practice to separate them to where they suppose to go for example now the game rules are in the gamemodeBP and the controlls and char mechanics and Hud are in the PlayerController.

One way of showing the Updated Health as seen in the video is using the BPinterface created and binding the HP and choosing the target of the BPI in the hud as the player you want but that cause UE to crash so obviously i cant use that, i tried making a basic updating one and adding that to the damage function but that doesn’t work either and im a bit lost on how to keep both the player and the enemy health updated in the UI.


What i meant by binding the HP with the BPinterface:

I use Interface
Step one:

Step two:

Step three:

I store UI ref in GameMod and then call it through the player via Interface.
You can call interface from any of your actors.

1 Like

It wasnt quite what I was looking for but it did help a lot to understand what im missing also I didnt know i can put Interface on my hud which lead me to my solution!

Thanks a lot man helped me a lot!

1 Like

Im new in UE too.
Its good to have a support that is helpful :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.