Plugin Request : Save/Load Persistant obj

0 favourites
  • 9 posts
From the Asset Store
Template for a generic save / load system, fully documented in comments and video
  • Hello everyone,

    I'm not sure if it is possible but I was wondering if someone can do a plugin that load&save the stats (position, variables, destroyed or not...Etc) of objects with the Persistant behavior and only those objects.

    This can help me to easely keep tracks of any persistant objects of my game (bonus, moving blocks, door stat..Etc) and I can use a webstorage for all the globals.

    I'm trying to avoid using the save/load feature. (for many reasons)

    Thanx!

  • Rex made this SaveLoadStatus plugin here.

    Its a more modern version of the instance bank that uses the new inbuilt save load features. It doesn't like loading object on different layout than it was saved though, see my workaround later on in the thread if you need to do that.

  • tlarkworthy Thank you for the link. I'm trying to understand the logic of the plugin but I don't get it, even with the example.

    As I'm not a programmer at all, I have a lot of difficulties to understand those plugins. Sorry about that. I like when things are simple! But it's not always the case. ^^

    I don't know if it can do that : save the stat of sprites in a family and then load it.

         -SaveStat Family "one"

         -LoadStat Family "One"

    If a object has been destroyed, it is not recreated.

    If a block has been moved, it keeps its new position.

    If the door has his variable "Open=1", it keeps it.

  • In the build R151, there is a new thing :

    d"New common expression 'AsJSON' and common action 'Set from JSON'. These allow you to take advantage of the savegame system to save and load individual instance states without having to save or load the entire game, as well as other useful things like setting one object's state to another's."

    Can it be used to do what I'm looking for in that post ? If yes, how to use it?

    Thank you

  • Why do you want to avoid the built-in savegame system? It also saves and loads persistent objects.

  • Hello Ashley,

    I want to avoid the built-in savegame system because it seems to take a picture of the memory, like the save/load stats of emulators.

    It saves everything, objects without the NOSAVE behavior, the music and where it plays, the sounds playing while saving, all the globals..Etc.

    So after trying it, I bumped into some issues :

    -My main menus options are overwritten when I load my savegame

    -The music and sounds are playing where they stopped (I find a trick to avoid that but I would prefer not to)

    -When I add or modify elements on my game and load a savegame, those elements are not shown or not modified. (That's a real issue for testing or patching the game)

    -Probably other issues I've not yet discovered.

    All I want to do is to save and restore the stat of the persistant elements. That's all. And deal with Webstorage for everything else but I don't know if it is possible.

    Perhaps I don't understand how the load/save feature works but I feel like there's a lack of controls anyway.

    By the way, I'm also interested into a 'reset Persistant objects' because the only way to go back to main menu and start a new adventure is to close the app. (otherwise, all the persistant obj keep their stat)

    Sorry if it is confused but I have a non programmer eye.

  • There are workarounds to all of that. Try using WebStorage to store menu options, and using the Audio object's new property (in the latest beta) to choose what is saved and loaded (e.g. you can choose not to save or load any audio, or just sound effects and not music, etc). Also if you add a new object, isn't it still there after loading a game? I thought I coded it so if a new object is added since making a savegame, it treats it as if it has the no-save behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley

    I already use Webstorage to store menu options. It is stored into a global variable. But when I save the game, I have no choice but saving that global too. So when I go back to the menu, change, for exemple, the fullscreen to OFF, when I load the game it overwrite it to ON.

    When I add an instance of a persistant objet, for example more bonuses, they don't appear if I load the savegame.

  • KaMiZoTo

    sorry for old topic !

    are you solve your problem with save/load ?

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