Keeping hud

Hello everyone
I have made it so my character can swap to a character based on a progress bar but when ever i change to said character the bar just becomes blank again so i came here to see if you guys can help… i need to have the HUD persist while changing characters so the progress in the bar stays the same.

If anyone can help thanks in advance

Are you creating the HUD widget on the player pawn? You could always try placing that logic in the game mode or HUD class.

Right now i have it on the player pawn and it transfers to the child blueprints but my problem is i have a single progress bar that will be my energy and ammo but whenever i change characters i lose whatever is in that bar that is the info i am trying to save sorry if i was not clearer in my original statement.

You should create a game instance, and store thoses variables in, it will keep them all the playtime and then it s free to you to save them in a savegame.

I don’t know your knowledges so I keep going:

From the BP you need the variable, at event begin to play cast to you game instance and promote it to a variable, then you can get any variable from the game instance and once again you won’t have any reset probleme while changing character or even level.

For the HUD, displaying it in gamemode is how I would’ve done too.

If you want to keep anything while changing character, don’t store it inside it.

As stated before I have the base character who can branch off to one of 4 characters with 2 evolutions each stats change depending on what branch they are in with a dump button to change back to the starter form.
So just wanted to double check to make sure all that would belong in game instance I know health stamina moves whatever are separated into the various characters but the rest belongs in the instance?
And thanks for all the help guys

All of your character changes will have to be in your charactersBP, If you use a parent BP with the variable connected to all of the states that’s fine. I don’t know what you’re trying to achieve but for sure all variables you got to keep between your non parent characters have to be stored in the game instance.