Score on HUD help

So i have a HUD set up and the score is on it. I have it setup to add 1 to the score when you shoot an AI actor with line trace. All that works, but it will not go up past 1. I want it to keep going up every time you shoot an AI actor. Here is what I have in the Character Blueprint:


How is your widget blueprint set up?

I have the text box binded to a function. Here is the Widget Blueprint:

And here is my HUD blueprint:

Your text is bound to a function, but the function doesn’t return anything. If you’re using UMG widgets, you don’t need to use a HUD blueprint at all - that’s using pure Slate, the old way to make HUDs. All you have to do is call Create Widget passing in the class of the widget blueprint then call Add To Viewport on the return value of Create Widget from some other blueprint like your PlayerController or something.

Though you still need to put some logic in that Get Text 0 function, like GetPlayerController>Cast>GetScore>IntToText>Return.

Okay so I got the Widget to show on the screen, but how would I make it go up when the line trace hits an actor? It would have to be in MyCharacter blueprint?

Nevermind I got it! Thanks for the help :slight_smile:

Cheers! :smiley: