How do I permanently destroy objects

0 favourites
  • 6 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • I looking for a way to permanently destroy collectible objects in my game I'm using the persist behavior which works between layouts/levels but the objects comes back when restarting the game

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to store the state of your collectible objects somewhere (save to local storage for example).

    When your game is restarted, retrieve this data and if the collectible object is already collected, just destroy it on start of the layout.

  • Is there another way to do it, I'm using the local storage to remember levels as to progess through the game and at the moment I have it so you have to collect the coins to complete the level there for unlocking the next level, I was hoping to change it so you could complete the level and unlock the next one without collecting the coins and have the coins as an extra challenge then have unlockables you can buy with the coins but I cant seem to get it to save or load a 2nd number and I was also trying to avoid using that method as it would require them to be collected in order to work

  • You really need to add some punctuation like full stops and question marks. It's hard to understand you.

    You should use Local Storage to store data between gaming sessions.

    Player opens your app -> you load everything from Local Storage. If player owns any unlockables, you add them to player's inventory and remove/destroy them from the shop.

    During the gaming session you store progress, coin balance and unlockables in data objects (global variables, arrays, dictionaries, whatever suits best).

    When player completes a level or makes a purchase in the shop -> you save progress, coin balance and unlockables to Local Storage.

  • Thanks, but not really helpful actually trying to avoid everything you just said. Sorry it was hard to understand but the first words were (is there another way..) to your first suggestion for using local storage

  • You can use the system save game to slot event that will store an image of the game and the state it's in at the point of saving including the state of the destroyed objects. I don't see what your problem is with using local storage though, if you are already using it.

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