Progress Bar Linked Variable not casting properly

I’ve been using the tutorial to help me in the aid of creating my hud and have come across a problem with my progress bars. Before I stopped using playerstart and just rebound my player controller to my pawn I had already placed. (I found this way somewhat easier to deal with.) But my progress bar will no longer display my current health from the variable any longer. I have isolated the problem down to being with my cast using a cast failed node which prints that my cast has a problem once I click play.

I used another forum post (Found Here) to aid me with this problem but it didn’t really clear it up for me

I have tried using both of these methods and both yield the error message.

Please Help me.

It fails because the player0’s pawn or character are not of type GolemTemp. You have to show us the character you are controlling to give a better answer. All we know is that your character is not a GolemTemp character or a derived character.

Most likely, the problem is that you use the node for construction. The player character does not exist yet. Use OnBeginPlay instead.

However, the best way to solve this would be to make a function or custom event called Initialize that you call from your character. The input is a GolemTemp reference that you send from your GolemTemp character. Just hook it up to the Begin Play event of your GolemTemp character.

HTH

Do you want the blueprint of the character im trying to cast to? Or is just the name enough?

The blueprint. Specifically what class it is and what parent it has.

sorry if its quite hard to see the details. The “Parent Class” in the top right says Character in case the picture is too hard to see. Im pretty new to unreal so I’m not sure if im missing something

Check answer. I updated it.

Where is it I’m supposed to be using Event BeginPlay? I already have it inside of my Character Blueprint and you cant use it at all inside of a widget.

I will tell you a better way to do it then. It will not be an answer to your question, but it should make it better.

Thank you for that, I’m appreciative of any help :slight_smile: