0 Favourites

Save games and INI files

This forum is currently in read-only mode.
  • Hi everyone!

    I am having on hell of a time figuring out this save game thing. From what I have read others have had the same problem. I am have a simple system by which a player has 100 health, then once it reaches 0 the death sequence starts. At the end of the death sequence the program saves all the stats, including the loss of one life, to an INI file. All of this works fine.

    My problem comes when trying to get the player back to the start of the level so they can try again.

    So I have a savegame that saves right when the layout starts, then an INI file loads in the previous stats including the players previous score and number of lives left. When i get to the death sequence and i try to load the game, it seems like the savegame also saves the state of the INI file. This is killing me! Can i save the state of the game, and somehow save external variables elsewhere? Is there something else I am missing? Does anyone have a good save sequence that works?

    I have tried NOT using save/load games and just teleporting the player back to the start with fresh and updated stats. This actually gave the effect that i wanted, except the level state does not reset (broken cubes are still broken, doors are closed and locked etc.) I am not trying to let the player save progress, i just want to use the save to get the player back to the start of the level and not have to manually reinstate each and every object that has been altered. It is super buggy if i do it that way.

    Any ideas would be greatly appreciated!

    Thanks!

    Nate

  • If would help plenty if you would post a cap.

    Anyway,try this

    System-Goto Layout LayoutNumber

    Which should reset the layout and all private variables and so on.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Beautiful! That works like a charm! It allows me to maintain data in my INI and still reset the level! Perfect!

    i will post a cap soon, but I am trying to hold off until i really have a decent playable version, until then I will just try to explain my problems the best that i can. I knew I was just missing something obvious!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread sticky
763 305,709
asikanddestroy's avatar
asikanddestroy
Unread hot topic
232 177,685
Tetriser's avatar
Tetriser
Unread hot topic
266 15,906
GameeApp's avatar
GameeApp