0 Favourites

How do I save game without saving layout ?

  • Hi.

    It's possible to save game state and when is loaded don't go to the layout where game has been saved ?

    Thanks

  • I dont think so using the built in save option. When you save it is essentially a snapshot so when you load it back thats what you get.

  • You can save just an information using WebStorage. This way, you can do what you want.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • What about:

    System -> On Load Complete ---> Go to layout "whereEver"

  • You can save just an information using WebStorage. This way, you can do what you want.

    I think i need to do this, the only problem is that i have a lot of arrays to save.

    What about:

    System -> On Load Complete ---> Go to layout "whereEver"

    I tried this and don't work.

    Thanks for the opinions

  • Another doubt, i need to save game automatically when user closes window or close application. How i do this ?

  • Personally, after my "load game" is complete (so.. on load complete) ... depending on some variables, i call the layout "menu" or "stage", so that works for me.... so far

  • Personally, after my "load game" is complete (so.. on load complete) ... depending on some variables, i call the layout "menu" or "stage", so that works for me.... so far

    Can you change my example to help me?

    I save my game on layout 2, but when i start the game i need to load and stay in layout 1.

    [attachment=0:3gk5yjk3][/attachment:3gk5yjk3]

  • Maybe use a global value to keep track of the game you supposedly loaded, but only load it once you're ready to go from your desired layout the the actual layout that was saved? Basically, trick the player into thinking the game was loaded, but really its not until you select that specific latyout or whatever...

    or a hybrid of what I just said...like, have the save option save both the full layout, but also whatever basic info you need in webstorage...then the load feature first just loads the specific data you needed for the first layout, then loads the actual saved layout when the player goes there....make sense?

    cheers,

    Mike at BrashMonkey

  • let me check into it and get back to you with an alternative

    cheers!

  • [attachment=0:3fda4zqj][/attachment:3fda4zqj]

    Here is my structure for the load and save game... I use a variable set to 0 to check if the game is loaded.. if not, then

    check if the "gameIsLoaded" is set to 0..

    if true, then

    1. call up the load event... then

    1a. on load complete.. do something... the "gameIsLoaded" will automatically be set to 1, since it was saved with this state

    1b. on load failed... do something... and set the "gameIsLoaded" variable to 1

    so the next time the layout is called, if the "gameIsLoaded" is set to 1, then save the game...

    what you could do also is use a 2 frame animation that you exclude from the savegame event... and use the frame no to determine which layout to call...

    if you want more detail on this last one, let me know

    cheers!

    Marc.

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