I need help with updating variables from a pawn to the hud. Basically instead of using the first person template I created a brand new project using a pawn and a static mesh as the main character. I am trying to update the hud with information such as battery life remaining however I can not get the reference to the pawn correct.
This is my current set up for getting the battery level from the bot character and putting it into the progress bar on the hud
This is how I am creating a variable with the object reference to the bot so I can get the battery level from it.
and lastly here is the error I get when you run the game.
I’m not new to unreal engine however this is the 1st time I have started a project from scratch, with the character template I know how to do this but because the nature of the character I am using I need to start from scratch. Any help would be greatly appreciated and if you need any more information/ screenshots just let me know and I will send it right away. Thanks in advance.