No announcement yet.

Load Game from Slot is reading wrong file?

  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by HaxO View Post
    After you try it in editor and then create a shipping build does it load the editor information in the shipping build?
    Yes it did actually.

    There is some strangeness in the way things are being done, or maybe I'm not understanding what you are doing correctly, such as SavedPlaque is not created unless an option is changed under "2. Choose Plaque". If I leave Main Campus as the selection and make no further change there, the save isn't created. This is because of the way you are handling the event dispatchers (only called if something is changed).

    Also, you are duplicating logic in the construction script and event begin play. I think using saves in the construction script like that isn't going to work well, it is relying on something that may not exist. There isn't any checks before loading saves, and the old meshes were staying for me. PlaqueBlueprint also relies on variables from an event dispatcher on begin play, that won't have been called. It won't matter for some which have default values, but it's using the enum directly from the event.

    When the second map opens, there is no main menu, and the so the cast fails and nothing else happens in the event graph.

    I suppose you are doing it this way with the construction script and event graph so that when you open the map it uses the construction script, and otherwise uses the menu but I think you should spawn it instead, and have your values set to be exposed on spawn. Probably most of this is intentional, and doesn't answer why it is using different save locations, but I think it could be complicating things. I didn't get a chance to look into in detail, I will get back to you again if I find anything more relevant.

    edit: also actually in the SaveInformation blueprint, you check if the save exists and laod it, but never actually do anything with it, you jsut save over it. I don't think you need to load it , you can just overwrite it. Also, all of those set the same SavedInformationActor, I changed it to promote the casted save to a variable and use that (each one using one of the 3 save types), it makes mroe sense to me, but it didn't fix the issue.

    I wonder if when the shipping build can't find a save, is it juts using the meshes that were set when the game was built? As in, it isn't actually loading a save from the wrong place, it's just not loading at all? When I deleted all saves it kept using the last text I had in the editor when I'd built it anyway which was just "!!!!!!!!" or something.
    Last edited by Mosel3y; 11-03-2015, 10:17 PM.


      Thanks for the insights! Seriously, You're the first person who has had any ideas on what could be causing this.

      Alright, so you think the .savs should be created on begin play if they don't already exist, Then saved over when changed?

      I like your idea of getting rid of the construction script and instead building the assets on begin play. Originally the event script was only used in the first level so the user can see a preview of what the construction script will be building in the following levels.

      The main menu is only supposed to exist on the first map.

      On begin play in the TextSwap BPs it should be destroying all the meshes that were previously created and getting the new meshes from the SavedText.sav Really strange that it is keeping the meshes without a sav to read from. On my end if no SavedText I get no meshes.
      Last edited by HaxO; 11-04-2015, 04:42 PM.


        Hey HaxO, I think I have fixed it, it now uses the correct save locations. Hopefully it will work for you too.

        I'll upload my changes so you can see, and just summarize some of it here. It does break the preview idea though, you'll probably need to look into another way of doing it.

        I believe the edit to my post above was what was happening. The constructions scripts were causing problems, and loading saves that didn't exist were causing problems. Event dispatchers were causing problems, notable with the PlagueType enum, which was usin the value from the event, and not the local enum.

        -Removed construction script
        -Made all plagues invisible by default
        -Check if menu is found, if not check if save exists, if it does load it and set the values. If the menu does exist, continue as normal. Both paths set PlagueTypeLocal, and go to the switch on enum. This means the actor works in the first level with the menu, and when you load, without a construction script.

        -Removed check for save file
        -Always creates new save object and overwrites (no reason to load)
        -Each promote the casted save type to a variable and use that

        TextSwap Actors: (same changes to all 3)
        -Removed construction script
        -Check if menu exists similar to above
        -Check if saves exist
        -Explicitly set values
        -Fixed how StoreAllMeshes was being destroyed

        Let me know if you download it and it's working for you too


          Awesome work! I just tried your example and it worked perfectly. Going to start getting the solution implemented. Will update later on!

          The preview was working as well. It just wasn't getting the translations right. I will look into it.
          Last edited by HaxO; 11-05-2015, 11:13 AM.


            Woot, Everything is in there and working as expected. Thanks for the help!

            To fix the preview I set the UpdateLines dispatcher that triggers when the update button is clicked to also be called when the plaque is changed.
            Last edited by HaxO; 11-05-2015, 04:40 PM.


              No problem, glad it's working