I made a really basic RPG set up and I'm trying to see how to get Makinom to save my Player Object Variables such as Health and Speed.
I have 4 save slot files and when I go to Save Game Menu in the Menu tab and make sure that save object variables is checked. I press play, lose some health/speed and save to slot 1, then I go back to the Main Menu and load the saved game 1 and the variables are reset, as in the players Health is returned to full and the speed is returned to original speed as if it was a new game but spawned at the save point. I just want my player stats to be saved for each file saved because not all save points will have the option to give the player full health.

Any help would be greatly appreciated.
Thanks,
=]
Portfolio - My Website
Follow my project on Reddit - My Game DevLog
relentingVids - My YouTube Channel
Half Super Shop - My Shop
  • If your object variable components are set up as Local Variables instead of using an Object ID, they'll not be saved in save games.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited March 2017
    That makes sense, but if the Player prefab is set with an object ID wouldn't it share the variables with spawned Player prefabs in a new game or loaded game?

    How would I be able to change the Player Prefab Object ID in a running game?
    Would I have to make conditional Player prefabs with separate IDs to check if Save Game(s) Exist?

    ***Edit, I fixed the issue the Player variable kept resetting because I had some Global variables that the player object variables would reference to and reset to new game stats.

    Thanks!
    =]
    Post edited by relenting_1 on
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • edited March 2017
    OK I got the Object Variables to save but now I'm running into a Player Name conflict where one game will save the name of the player then when I make a new game and save it it changes both names in the save files to the last saved game player name.

    See video for what I mean.
    Video
    Post edited by relenting_1 on
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • Can you send me a test Unity project?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited March 2017
    I will send a test project on my lunch break in about 4 hours.

    **Edit: file has been sent
    Post edited by relenting_1 on
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • edited March 2017
    I may have figured it out the cause of the problem but not a solution yet.
    The variables in the Save Game Menu File Settings are taking on the Global Variable String playerName. Since the name changes with each character made it saves the save game file name to which ever the last player name whom saved a game last.

    In Save Game Menu>File Settings>File Info the text code for Player Name is not working for me?

    Also the Set Game Time Node is causing weird issues when clicked on in the Schematic Editor Window.
    Post edited by relenting_1 on
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • Yep, text codes like the variable text code are currently saved directly into the file info of the save game, instead of saving the value they represent. Will be fixed in the next update (also the Set Game Time node displaying weirdly).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Awesome thank you so much GIL!!!
    Just a quick question about this update, would saving a game make it save all game variables at the time, like a snapshot of current variable data?
    If so that would be so totally cool for the save game settings!
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • All variables are already saved in the save game (unless set up otherwise in the save game settings).
    The issue currently is only that the save game info text that is saved alongside the save game is containing the text codes, not the info/value they represent - and since displaying the info text doesn't load any data from the save game, they're replaced by the wrong values.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ok I got it now thank you very much GIL!!! =]
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
Sign In or Register to comment.