How do I save player's power up attributes when player loses a life and level restarts?

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I tried going by the local storage high score method, but didn't work.

    The player collects items and their power up count goes up (along with the power up sprite colors). I just need it to save the count and the frame the power up sprite avatar is at if restarting the level(s) throughout the game until player loses all lives and has to start at the very beginning.

    Any chances of anyone knowing how to do that with either a screen shot example or typed out conditions/sub-events/actions, etc.?

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Local storage or save game is how you would do this if you exit the game to restore it on game launch. Since you are talking about within the same game session you can store the data as global variables, they'll keep their value when you go between layouts. Another way is to store all the data in an array object (table) and read from it. When you lose all lives you can run the reset global variables action.

  • Thanks. How would I set it up using global variables so that it saves only in the same game session?

  • By default it should be saving the value if you set them to global variables. When you go between layouts or levels and such the value should be kept. If you want to reset you can use reset global variables action when you hit 'new game' button or however you restart in your game.

  • Ok. Thanks. I’ll have to give it a shot.

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