williamsa08706's Forum Posts

  • 3 posts
  • In my game, players can get achievements by doing certain actions (right now I have a temporary conditions where I press letter Q to activate achievement 1, and press letter W to activate achievement 2). I want to set my game so that when the player dies (health is less than or equal to zero - event 60), the player will save ("carry") their achievements with them until the game is closed. I am using a LOCAL STORAGE & an ARRAY to save the activated achievements.

    Currently, when I debug the project, I can see that the LOCAL STORAGE is saving the ARRAY data when the achievement is activated as expected (event #107, which calls the FUNCTION SAVE (event #127)). When the player dies, and selects a map from the MAPPICKSCREEN layout, it resets the achievements (ARRAYS values - Achievements.json) back to default...

    # click on the START button

    # Click on a Map

    # Open Debug Project

    # Go to Object Local Storage

    # Play the game

    # Press Q (to activate the achievement) - this is where the first value in the array will change to "TRUE"

    # Then Die (let the snakes reach the end which will trigger HEALTH less or equal to zero)

    # Then click on the START button

    # Click on a Map

    # You will see that the values in the LOCAL STORAGE reset back to default

    I have spent a few hours trying to get the achievements to carry over without success. I would truly appreciate any help you can provide me. I have attached the .c3p file for your review.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have code That is in my drive That I want to paste in my game and I was wondering if it is possible or not.

    Tagged:

  • 3 posts