GMBADev's Recent Forum Activity

  • Hello. I have an array that I use to hold each level and the number of stars earned. This is normal practice I understand. I also have a function which the system runs through to display the stars. It also displays the next level as unlocked if you have beaten the current level. This works perfectly. However, as soon as I added the Load JSON String LocalStorage.ItemValue on if my "arraysave" exists it now will not unlock the next level. As you can see in the screenshot I have the load of the array turned off. While it is like this everything works. As soon as I enable that, it will no longer unlock the next level. Curious enough, the current level does keep the stars and animations. Any help is appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When I click the link it takes me to the demo editor. I downloaded the demo but the cp3 is using functions I am not familiar with. Based on what I have read I should be able to use a Load from LocalStorage.ItemValue but I want to make sure that it is picking up the array and not my sound settings.

    On a side note, I have tried using AJAX as this seems pretty simple, but it won't let me pick my array. When I call project file the only things I have in the dropdown are some icons. It wont let me manually type the name of my array or select it.

  • I figured out how to save and load my sound settings. Apparently Saving and Loading an Array is not quite as easy.

    Based on what I have read from the array info and the local storage info I have the following.

    I first check if "ArraySave" exists

    If it is missing I Set Item "ArraySave" to Levels.AsJSON

    Levels is the name of my Array

    If it exists, then I have local store get item "ArraySave'

    Then I have it my Array called Levels Load from JSON String "ArraySave"

    I saw somewhere you can use AJAX to do it, but the steps say to retrieve array and I dont have that option. I can retrieve a project file or a URL.

    I appreciate any help.

    Tagged:

  • Thank you for the help. This is working a lot better!

  • Hoping someone can help. I accidentally posted this to Construct2 and it is in Construct 3. I have an end game layout that is not updating. There are multiple portions which do not update. The animation for how many stars and the text box which either says "So close" or congratulates you on how many stars you have earned. I originally created the text box from scratch. When it didnt update I tried cloning the one I use for my timer as that works fine and renaming it to match the events. The text box still does not update. I have even tried deleting the layout and cloning one of the game layouts thinking it was a bug from the layout.

    I will attach a picture of the code. It is the EText box which is not updating before it goes to the EndGame layout when the timer hits 0. It also doesnt update in any of my other events, so I started with just getting this example working.

    Tagged:

  • k I can move it to that forum. Changing order of event doesnt do anything. Already tried it.

  • sent to your email

  • I'll email it to you. Where to?

  • The timer and lText ones work fine. It is the EText which does not update when the timer runs out. The game does go to the EndGame layout. That layout is using this same event screen for now and there is nothing that would reset the text.

  • I apologize if I am new to this. Do you want a screenshot of the event page or do I need to upload the capx? Just trying to make sure I am careful with my game code.

GMBADev's avatar

GMBADev

Member since 28 Apr, 2013

None one is following GMBADev yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies