Update HUD Elements with a key press

I am trying to have some HUD elements update using a key press. Any key press events placed inside the HUD eventgraph is ignored. I have some variables that I want to change that will update the HUD element’s y position but I cannot seem to find a way to get those variables seen outside the HUD event graph so that I can change them in the level blueprint. Custom events made inside the HUD eventgraph are also ignored. Is there something easy I am missing? (the answer to all of my UE4 problems so far)

If you want the HUD to respond to key events you will need to Enable Input on it, probably from Begin Play.

Could you be more specific? I found no settings for that in Play options. I also added an Action Input and that did not work. There are no settings on the blueprint itself.

That was it. you so much

In the HUDs blueprint graph you’ll want to add an Event Begin Play node and then connect it to an Enable Input action. I’m not quite sure why it isn’t showing up on the right-click menu, but you can drag it in from the Palette and then specify the owning player controller as the controller to enable input for.

2850-enablehudinput.jpg

you so much! I used to put my character HUD related stuff in my character BP which was a bad idea. Inded, I had widgets stacking on top of each other (one per character instance). Moving my character HUD related stuff to my HUD blueprint solved the issue. :slight_smile: