Why doesn't my HUD work? (newbie question)

I’m very new to UE4. Trying to adapt the UMG Quick Start to work with a ThirdPersonController. I added the four variables (with nonzero default values) to my ThirdPersonController blueprint, and hooked up the UI elements per the guide, but when I run, all my UI elements show zero, and my Message Log fills with errors:

If I select my ThirdPersonCharacter, and click Edit Blueprint, my variables are there:

The errors seem to reference the bindings on the CurAmmo and MaxAmmo texts, which look like this:

These make use of the MyCharacter variable, which on the main graph for the HUD, is set as a cast of Get Player Character(0):

I also tried changing the MyCharacter variable to public, but that made no difference.

It may be worth noting that the progress bars show zero value at runtime too, even though the default value (and the actual value shown in the Details panel at runtime) is 1. The “Percent” of those progress bars are simple bindings to MyCharacter.Health and MyCharacter.Energy. So, these bindings aren’t working either, though they don’t seem to spew errors.

I’m stumped at this point. Any idea why all this doesn’t work?

If those screenshots are accurate, you don’t actually set MyCharacter at all because the Cast node is not connected to anything. Connect it to EventConstruct and see if it helps.

1 Like

OH! I see what you mean — its outputs are connected, but the invocation pin (or whatever it’s called) is not hooked up, so it never actually runs.

Thank you, I’ll try that!