[Solved] How do I use save/load in r124?

0 favourites
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • [r124]

    I put 1 sprite, save, destroy it, load. But no sprite created.

    How do I use save/load?

    Ans:

    • save

    + on save complete

    • destroy
    • load
  • I would try putting some ticks between or something... then again, I haven't touched it yet so I may just be talking out my hoohaa... No manual entry for it yet?

  • BluePhaze

    I'm waiting an example, too.

    I put a wait 1 sec action before load, but still no sprite created.

  • Odd, maybe it is a next top level event needs to fire first type of thing for the save to finish? Maybe try with a couple of buttons one to save with its own event, and one to load? I will through some test together in a few minutes to see what happens...

  • BluePhaze

    Yes, I find the missing condition, thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I got it working, I made a simple capx with 3 sprites, clicking on one of them saves, clicking on another loads. Clicking the third one moves it 10 pixels at a time. So I move it a bit, then save, then reload the layout, then load and it goes back to where it was when I saved it. Now I just need to find a way to save to a remote location in case I want to allow saved games to be used between multiple devices by the users...

  • The interesting thing is -- the uid will not be increased after loading. Old instances will be changed by loading info.

  • The UIDs are probably saved as well. If you have the UID of an object in a variable, the reloaded object has to have that same UID for the variable to have the right one.

  • Another one to watch out for, if you save a game, then an update gets pushed out for the game, then you load the updated game and have it load the saved state, you may get some oddities because the old state of the objects is loaded. For example, I saved the game state, then added some new UI components and moved some of the old UI components, did the rebuild and ran the update version, hit my load save game button, and the new UI components still showed, but the old ones jumped back to their old spot which caused a good deal of oddness in the HUD/UI layer. Just one thing to be cognizant of, the old state of objects saved does not take into account new objects which makes perfect sense, but I can also see a lot of designer getting into trouble with pushing game updates to games that support the save state features...

  • Save is asynchronous and hasn't completed until 'On save complete'. So if you do Save and Destroy Sprite in one event, the destroy will actually happen before the save and therefore get saved with it.

    Also note UIDs are saved as well, so when loading objects restore with the same UIDs they had at the time of the save. (Otherwise lots of games would be broken!)

  • make source code to save and load, I can not do.

  • degortg YOu create a condition and use the system save or system load events. Here is a screenshot of a very simple event sheet where you click on the red sprite to save, and click on the green sprite to load:

    <img src="http://dl.dropbox.com/u/10285716/ConstructSampleScreenshots/SaveGameAndLoad.png" border="0" />

  • dl.dropbox.com/u/105458484/save.capx

    here's the source, and it does not work, the progress is not loaded:(

  • degortg it is working just fine. Move your player, hit the save button, move the player some more, hit load. The player goes back to where they were when you saved. . It works fine. I tested your project and it worked like a charm just the way you have it.

    You are most likely hitting save, then hitting load. Which will not show any difference since the player is in the same spot. Unless you do something to move the player after the save, you won't see a difference in the load.

    I am running this in IE10 on Windows 7.

  • and not working windows xp, windows 7, browser SR WARE Iron, the same google chrome!Launching the project, change the object's position, I press save, close the project, starting from scratch, I press download and nothing is loaded:(Everything right???

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