Upgrade player?

  • Okay so I've never used upgrades in a game before and for this game it involves a player hitting an object to gain points. As well as the points there are also gems to collect.

    These gems can then be used to upgrade the player. Now for upgrading the player it isn't increasing the performance etc, just changing the appearance.

    Lets pretend I want to change the player from red to green.....The problem I am having is that when I am on a different layout to the game, if I have on clicked on object change player green, when I go back to the game layout It obviously changes the player back to red as it resets the layout. how can I stop this from happening. I also need it to be WebStorage so that the player doesn't revert back to red once the game is closed and re-opened?

    Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use a global variable to store the info and save it to local storage..

    Then on start of any layout you check if the item exists and set the global variable to it's value and set the player to the global variable..

  • Thanks I'll have a go at that now

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