How do I stop arrays from being saved?

0 favourites
  • 4 posts
From the Asset Store
Match the similar cards with each other and free all animals!
  • With sprites you can give them a "No Save" behaviour.

    Say I have an array or a Global Variable that I don't want to be included in the save game.

    How do I stop that from happening?

  • Yeah, it's really annoying that NoSave behavior can't be added to arrays, dictionaries and JSON.

    I remember posting this suggestion, but it must have been on an old platform, and it never got implemented.

    What you can do is save array.AsJSON in an instance variable on a sprite with NoSave behavior, clear the array, save the game, restore the array from that instance variable.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yeah, it's really annoying that NoSave behavior can't be added to arrays, dictionaries and JSON.

    I remember posting this suggestion, but it must have been on an old platform, and it never got implemented.

    What you can do is save array.AsJSON in an instance variable on a sprite with NoSave behavior, clear the array, save the game, restore the array from that instance variable.

    Haha! Yeah, that's what I had. While making it, I kept thinking how frustrating it was. Reminds me of the time a year ago where I mentioned multiplayer breaking when you leave the server before leaving the room. Ashley pretty much told me it was my mistake and I had to work around it.

    https://www.construct.net/en/forum/construct-3/how-do-i-8/multiplayer-broken-163229

    Look what's coming out in the next stable build! A fix for my exact issue.

    I guess all I needed was to wait for Ashley to start developing a multiplayer game.

    I hope a year from now I'll be able to have more control over what gets saved and what doesn't. Hopefully Ashley will try to add the ability to customize a save in his game, and we'll get it sooner XD

  • Just did a Google Search to see how to do this, and was saddened to see me asking the question 4 months ago.

    Grumble grumble...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)