tf_likha's Forum Posts

  • 7 posts
  • Please see this demo on how to use Local Storage correctly and save/load array data.

    https://howtoconstructdemos.com/easily-save-multiple-values-in-local-storage/

    Very Helpful. Thank you!

  • > I want to write and read array to/from localstorage?

    > how to do this?

    >

    To save it just set "LocalStorage -> Set key [key] to [Array.AsJSON]

    to load it fetch the key and set load the array like

    On LocalStorage Item get => Array => Load From JSON [LocalStorage.ItemValue]

    Regards

    Andy

    I'd like to know if I did this correctly:

    System | On start of Layout = LocalStorage | Set item "key" to LevelArray.AsJSON

    LocalStorage | On item "key" get = Array | Load from JSON string LocalStorage.ItemValue

  • You missed these two actions:

    Edit: and also conditions comparing Touch.Angle in events 5 and 6.

    Oh! Got it!

    The file I gave you apparently was faulty because I accidentally deleted the touch object.

    After including it back, I was amazed that it suddenly worked on the testing capx (after including the events you marked with red)

    The problem in my actual game file was that the "Touch" object was in a folder. But when I placed it out of the sub folder, it worked!

    Good Lord I spent almost the entire day doing this. I'm going to cry hahahaha

    Thank you for answering!

  • tf_likha Yes, if you are manually placing all buttons in the menu, you don't need those events. But you still need to pin the buttons to the Panel object.

    Oh and this one is what I did with your code: drive.google.com/file/d/1_JpiogcjIgclvPEBOARtJgQk7PXiOjYY/view

  • tf_likha Yes, if you are manually placing all buttons in the menu, you don't need those events. But you still need to pin the buttons to the Panel object.

    Got it! I do have another Q though.

    I copied the code and when I run it on your capx, it works fine. (The scrolling by dragging). There's this subtle movement and doesnt stop if you let go.

    When I run it on my end, even with the same codes, the output isn't the same. It stops when you stop dragging it.

    Is there a way to fix this?

    My code: snipboard.io/qE5vKZ.jpg

    Workboard: snipboard.io/FEemLD.jpg

    Behavior of my panel: snipboard.io/UcnshE.jpg

    mouse scroll is good but the dragging - I'm lost.

    Here's my cp3 file: drive.google.com/file/d/1fObmx_IJQgDDWDrsyDK75abbGidZo62q/view

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > Which demo are you using? Mine or LaurenceBedford's?

    > In the demo I posted, the scroll is limited by the size of the Panel object. You can manually place all your menu buttons on it, resize Panel to cover all buttons. Then Pin buttons to the Panel and the scroll should work correctly.

    >

    >

    >

    >

    >

    > Also, re-download the demo, I updated it a few minutes ago.

    Im using yours. I had pinned the buttons to the panel and resized the panel accordingly, however when I scroll, I can simply scroll the panel off the screen, with all the buttons on it.

    QQ:

    if I'm doing it manually, I only need to use these events right?

    snipboard.io/xPf1w9.jpg

    These are not necessary if it's done manually (pinning the objects to the panel) ?

    snipboard.io/CogeHA.jpg

  • QQ:

    What would "Game Events" Usually cover that Level x Events have?

    Are these the main player's controls? Hoping for someone to explain this. Thanks!

  • 7 posts