Please, help with a local storage/save problem I'm having...

0 favourites
From the Asset Store
Ludo Local Multiplayer board game can be played by 2 to 4 players
  • Hello all, I really need some help with a local storage (saving) problem I'm having at the moment. I'll pm the capx to you if you could help me out...

    Thanks in advance!

  • Please all... I really need some help with this. I'm soo close, this is the last thing I need to figure out before finishing my app.

  • I *just* figured out the Local Storage stuff myself. (So I'm NOT the right guy to comment on someone else's .capx) But what is the general issue you're having?

    I like to organize my code into groups that I can turn on and off as needed. This may not be helpful at all, but here's how I handled Local Storage:

    [START GROUP]On start of layout:
         get item "player"
         get item "score"
         get item "sound"
         Set group "START GROUP" Deactivated
         Set group "GET VALUES" Activated
    
    [GET VALUES]
    On item "player" get
         System -> Set item global_player to localstorage.itemvalue
    On item "score" get
         System -> Set item global_score to localstorage.itemvalue
    On item "sound" get
         System -> Set item global_sound to localstorage.itemvalue
    On All Gets Complete
         Set Group "GET VALUES" Deactivated
    [/code:39omiwki]
    Good luck with your project!
  • Hey I was using the check instead of get item on start of layout. Is that wrong? I'll change it from check to get and see if it works.

  • No, it's still not working. Changing it from 'check' to 'get' did nothing. Guys... I really need some help with this problem. I've been at it for hours now (local storage is very new to me, I was using web storage before.... even after reading all the tuts, I still can't get my app to work... I really have no idea what to do at this point):(....

  • Bump

  • BUMP...

  • Can someone please help me with this problem?

  • I can't find the original thread, but here's a basic example:

  • Can someone tell me what's wrong with this code (/why my Local Storage is not working)? My code is all at the top. Could that be the problem? Does the code have to be placed in a specific way?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Where are you saving the data?

  • What do you mean? I thought I was storing it in Local Storage... no?

  • No, you are retrieving the value that was saved, but you need to save the value for next time.

    Right now you are asking if the value exists, it doesn't, so you setting your Global to a default.

  • Oh, okay, so how do I go about saving the value for next time?

  • blackhornet, if I sent you the capx, could you help me out with fixing it?

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