How do i stop progress bars from resetting when i open a new level?

I am currently making a Tamagotchi like game using Unreal and I am using multiple progress bars to show the pets needs and I am using multiple maps/levels for example I have the main room and then a bedroom for the pet to sleep but every time I click the button to go to the bedroom the bars reset and go back to 100 but I need them to stay the same. How would I go about fixing this? I am very very new to Unreal so any help would be appreciated especially screenshots if anyone has any!! Thanks

You will need to use variables that remain persistant across level map.
Look for game instance, that where you can store your pet data.
You will also need a save game system as well.

  1. Create a new bp class>GameInstance:

  2. Project setting > map and modes > set your game instance:

  3. Add your variables to your game instance bp:

  4. Then use get/set from the game instance in your widget for your pet data.

1 Like