GMBADev's Forum Posts

  • What would I change it to? I can post a picture of my settings, but its currently set to center and uses letterbox scaling. Outerscaling doesnt fix the the offcenter issue.

  • Currently using 16:9 with Letterbox scaling. Playing on Galaxy Devices, it looks beautiful. But when I play on a Google Pixel, the picture is off center. It is shifted to the upper right. How can I make it centered properly?

    Tagged:

  • I am trying to use local storage for saving key variables for my game. Including a levels array. When I run the preview and check the debugger, everything shows properly saved. Where I am running into issues is loading the data. Something seems to be breaking in this process.

    The only thing that works is loading my array. My levels load and their progress shows.

    However, it does not load that the next level is unlocked. So if I beat levels 1 and 2, then level 3 is unlocked. But if I close out and reload, it still shows levels 1 and 2 beaten with their progress but now level 3 is locked and I have to replay level 2 to unlock it.

    I figured this was due to not saving the "currentlevel" variablae which is used to ensure each level is unlocked in my events, so I started saving and loading that.

    However, when that loads, now all my levels are locked and I cannot unlock them. This happens even if it is a new load. So I added a callout to set currentlevel to 0 if there is no save, but this does not fix the issue. I have even tried using an event to clear local storage to ensure nothing is accidently loading.

    These issues also extend to my sound.

    If I save sound and then try to load the sound, there is no sound even if it was saved as on and I can no longer toggle it.

    I have attached a screenshot of my loading events. The On Item Get for the sound is removed because I was trying to focus on getting the levels to work properly first. Any help is truly appreciated.

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

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

  • Try Construct 3

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

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