Health Problems

Hello, I have made a health system. I have basically made a custom event that sets the percent of the health in my HUB blueprint. I then added a custom event inside of my Game Mode blueprint that updates the health bar. Then I added the any damage event which subtracts the current health from the max health. I then cast it to my Game Mode bp. I also call my begin play event which sets the current health to my max health then I cast that to my Game Mode BP. After all that, I expect my health bar to deplete, but for some reason, when I go to test it out with the pain causing volume, it doesn’t deplete my health. Can someone help me?

How to debug such problem:

  • use print to output log (Select that option)
  • open log window look there
  • for each event print that it happened
  • get reference to self, and add that as text/string to format, so you know who prints to log
  • use format text node to easily format log messages

If above does not work post pictures of your blueprints.

ps. Snipping Tool in windows is great for that.

I added the print string after the update health bar node and got a reference to self. It does show the character’s name, but it doesn’t deplete the character’s health.

He is currently inside of the pain volume

The message log says accessed none trying to read property Hud. I checked and it looks like the variable I made in the Game Mode BP.

I forgot to add set hub before add to viewport.

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