GMBADev's Forum Posts

  • 15 posts
  • 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.

  • 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:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • I cannot get this new text box to update. When I first started building my game I needed to create a timer. So I found code to a walkthrough for setting one up and part of it includes setting the text on the load of the screen. This works fine and this text box updates. Now when the timer runs out, it takes you to an endgame screen. To make sure I had a normal text box, I cloned the the timer one and renamed it. I then have it set to say "So close! You almost earned" & EStars & " stars!" the EStars are a global variable which is set to 0 but does not reset on any loads, so nothing is resetting it. Even if it did it would just say 0 stars. The default text right now says, "Hi" just to test if it will change, but it never changes. What should I be checking?

    Tagged:

  • you are correct! How did I miss this? Thank you for giving that answer. I feel bad for asking now.

  • I started making a game about 6 months ago and I had used a video called "Supporting Multiple Screen Resolutions." This video now seems to be gone. This video is different because it allows me to set up the "Guide" as the area that loads when you preview the game. I did not need an event saying "Scroll to (x,y)". Recently my computer did an update and the textures & Animations files were deleted, so I have to rebuild the game (luckily I took a screen shot of the events page). I can actually load the game once I get past all the errors, but none of my graphics have pictures since they are all deleted. They just have place holders with properties. The only part I am struggling with is getting the game to load at the center of the guide.

    Here is how I was set up before. I tried to copy this but it still loads to the upper left of the screen.

    Window Size 640, 360 with Letterbox Scale

    Layout is 1200, 800 with margins the same

    Guide is 640, 360 at position 600, 400

    Beyond this I am not sure what else you would need to help me. I could load the old Capx but it is corrupted and gives you a lot of errors. Thank you for your help.

  • 15 posts