However it only does it whenever I’m in a map itself. The value is retained dying/spawning as a different character. Though upon changing/exiting a map, server traveling to the lobby or closing the game. The value isn’t saved.
I think I have to work with a savegame slot here. However I’m not completely sure how I should go about this. Does anyone have an example as to how I can approach saving the FOV value and regaining it once any of the aforementioned happens?
With this blueprint setup I alter the value from my settings widget:
In my game I save FOV to GameInstance, and to a save slot.
On BeginPlay(), the character gets reference to the GameInstance and calls LoadSetting() function, which loads the save from the slot and sets values to the Character’s camera.
The LoadSettings() function can additionally have a parameter of type MyCharacter (your character blueprint class), so that the Character could immediately set a reference to itself in GameInstance, but that’s optional, you can get reference to your character in other ways.
Only thing I have to figure out is why it isn’t instantly applied at spawn. But I’ll get around to that! The main thing is, the value is stored and saved!
You can try loading it from the character itself, this way you can save some resources by not using casting or communicating between classes.
I just described my setup, where I have a lot of values stores in GameInstance because I constantly address them, but if it’s just FOV, you can skip the middle man and do it all in your character class.