How do I update/change values in webstorage

0 favourites
  • 5 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Hello,

    I have recently started making a game using construct2 but i found a big problem i can't manage to fix.

    I have global variable "Deaths" and Webstorage that stores the value for it.

    When the player dies (gets destroyed) Deaths get increased by 1 and Webstorage gets updated.

    My problem is that after first death the value doesnt want to get updated in any way and i cant seem to find the cause of problem

  • ,,,,,,,,,,,,,,,,,,,,,,,

  • I see what you did in that but unfortunately that doesn't solve my problem.

    So when i die for the first time, the value gets updated just fine but if i die again the value stays the same ;/

    Here are all the screens that use the WebStorage:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • on Start of layout set Variable to WebStorage

  • I added that function but the problem is still the same :<

    First deaths adds 1 to deaths but another deaths doesnt do anything and the counter stays at the same value

    I would attach a capx file but unfortunately i can't post links and the file is too big to use the attachment option

    This is the part responsible for loading the game (when player dies you have to press R to restart/load the game):

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