I need to read some variables from a PlayerState and I can cast into it without any issues during gameplay. If I try to cast to it in a SaveGame Blueprint, I don’t have the option to add nodes “Get Player Controller (0)” > “Target (Player State)” which I need as input when casting to my particular PlayerState. Why is that? If there is no way to do this particular operation, what options do I have?
The save Blueprint only support variables like floats and strings etc…
What are you trying to save?
My issue isn’t saving variables, it’s casting into a GameState which stores booleans ints floats etc that describe what’s happening in-game. I can cast into the GameState from the player, the controller, any actor etc, but there is no option to do so inside a SaveGame, which is my issue.
The SaveGame Blueprint can only make a “.sav” file and can’t execute codes by itself.
But you can add GameState to it, but you need a code from the player Blueprint, an Actor Blueprint or a widget.
Do you need help with save and load for your game?
Edit
I finally figured out how to use SaveGame properly. I created a SaveGame Blueprint, and added various variables I’d want to save. Instead of casting to it during gameplay and triggering Saving Events, I just use Save / Load Game nodes and cast to this for values.