Im new to Unreal, im trying to make a 2d Click game, for this i create an Actor and when i click this actor, it add 1 to my var, this is working, the problem is i trying to show this var in the HUD, but a can't do, I searched tutos but its only for players character, never to actor, so im bit lost. Anyone know how to do it? in the game i dont have a player, since its only clicks, so i think this might be the problem too.
Asked
Active
Viewed 255 times
2 Answers
0
add a function getHP to this actor that return the hp value as string. in HUD add function getActor to access this actor, then bind the text of HUD with getActor.getHP

sami zahwan
- 147
- 4
0
Are you absolutely sure this event is running? Add a breakpoint to the event and see if you hit the breakpoint.
If the event is running then you should definitly see something printed to the screen. Check in the top right for a tiny number in light blue which will only stay on screen for a default of 2 seconds. Click the down arrow on the Print String node and change the time to something higher and maybe the colour to something more visible.
If the event isn't running (which I think is likely), try following this tutorial to enable Click Events on a custom PlayerController.

jeevcat
- 343
- 2
- 12