Is there a way to save and get values from the game ini file?
Hi there, is there any way to save and get values from the game ini file from blueprint? it's a pretty necessary feature for almost every game.
Yes there is, I've seen various posts about this but for me this simple solution works very well.
In this example I'm using a fixed file name and save object but you can extend this simply to work with different files and object to for example keep game settings in one file and multiple saves in another.
First create a new blureprint of type 'SaveGame'. Name it to what you want but in my example it's 'PlayerObject'. Within Player Object have a variable that is a 'User Structure' you have created to contain all your save game info, IE Score, etc etc.
Then create another blueprint of functions and add the following functions.
You should then have a variable in your game controller which is of type Player Object. You can now call save game with that object and it will save it or return it in the case of load. I've seen people copying out data from the user structure to local variables then back in to save however you can work directly with your user structure and its a lot less work.
One caviate is that you must call StartNewGame Once before the above. You can do this using the function 'Does Save Game Exist' which will let you know if you already have a save game.
answered Aug 03 '14 at 09:58 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here