Storing variables and saving data.

Well because you are making a single player game, it’s really unnecessary to have variables in the playerstate because that is ment to be used in multiplayer games for things like your score and points. Variables that u have in the playerstate can be seen by any player in the game so it is usefull in multiplayer.

What u can do in your game is put variables in the game-instance. The game-instance exists over an engine session. So those variables will not get lost untill you quit the game.

So,… I have read many articles about this topic but I am still confused about which metod to use. Lets say that I have a main character in an offline game. Where should I have variables like MaxHP, PlayerExp and so on. The second question is how should I save this information. I am thankful to anyone that will try to explain it to me.

If u open the blueprint from your character, you can make variables and if u set them they will be saved automatically. But if u want to change thme in game and want to keep them you indeed need to make a savegame.

Tuturial: Save/Load Menu Settings - Unreal Engine 4 Tutorial - YouTube

thx for the answear. I know that I can have variables in my character and it is also where I have them for now but some say that it is better to have them somwhere else like in PlayerState or something so I don’t know what to do. Thx again.