webstorage

0 favourites
  • i have tried many time to fix this but i really couldn't find a way to fix that.

    (capx)

    https://dl.dropbox.com/u/90034817/scirra/levelSelect4.capx

    the thing i want to happen is :

    to save all array values and when i refresh the page the button should have the frame that fit the array value so if i played and got 1 star on level1 then i refresh the page it must have 1 star in that level and so on in all levels/worlds

    .i have tried to save array value as keys but the problem that the buttons doesn't change always has frame = 0

  • any idea that could help me?

  • Simple, 2 lines -> levelSelect6.capx

  • thanks ramones you i really don't know what to say ^^ you are the best

  • ramones, I've tried your capx, but the problem is that it only unlocks up to level 10. Once I win level 10, level 11 remains unlocked. I've tried to add the width of the array, but doesnt work. Could you help me? thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • nothaseo You might have an array called 'levels' with width = 10 stored in local storage (if you set the width to 10 the first time you ran it or even something you saved in a different project).

    It might be a good idea to set the size of the array to (12, 2, 1) after loading it. That would also be a good idea if you wanted to add more levels later while keeping your old saved values.

    And also use a more descriptive name like 'mygamename_levels' because you could have many projects storing a value called 'levels' in local storage.

  • Thanks ramones, I did you suggestion n found out that the problem's in the name "levels". I remembered that previously I worked on another game project with "levels" in local storage. Thanks

  • ramones

    Hi friends, i need some help plz,

    I'm doing a game with 3+ world ,but setting the array 12,2,1 doesn't work (it only unlock till the second world!)

    Any suggestions plz???

    Really tnks to all that could give some help.......!

    (sorry for my poor English!)

  • Not to bump an old thread - but this was great - thank you.

  • nothaseo You might have an array called 'levels' with width = 10 stored in local storage (if you set the width to 10 the first time you ran it or even something you saved in a different project).

    It might be a good idea to set the size of the array to (12, 2, 1) after loading it. That would also be a good idea if you wanted to add more levels later while keeping your old saved values.

    And also use a more descriptive name like 'mygamename_levels' because you could have many projects storing a value called 'levels' in local storage.

    i can't thank you enough!!!!!

    THanks]

    Thanks again

  • ramones can you please make the same saving things but in the exact progect as this your progect is slightly diffrent

  • anyone want to share a .capx file with me on how to use more than 1 frame for more than 1 level and level select screen as you see i have 50 levels and 10 worlds in my game so a total of 500 but i want only 24 in my demo version of my game and i do not need the level select to take me to the previous level or world once i have completed one and clicked on the next level select button for moving to the next level or world(level select screen) i also want to make a cartoon about my game character and have the player be able to choose one from 20 from my server each video is approximately 4 minutes long.

  • ramones great example!

  • ramones

    your work is great

    i have notice something

    every world their is level starting from 1

    how we can continue it

  • Hi there, I know it is an old thread but the link of the capx are dead...

    Do you have a new one ? I have the same problem : I 'm not able to use local storage the data after refresh the page.

    I would also make a multi world ( 3 or 4 ) with different level select 12 per world.. I read in this thread that I should organize all with array.. Do you have an example to share?

    Thanks in advance.

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