mekonbekon's Recent Forum Activity

  • nahima

    You don't even need to set the size of Array or loop it to get the data into array, the following will do:

    On start of layout: AJAX|Request dataBase.json (tag "data")

    AJAX | On "data" completed: Array|Load from JSON string AJAX.LastData

    This should automatically resize the array for you and load in the data.

  • Glad to be of service

  • First move sprite 2 to sprite 1 so that it is in the correct position.

    Then pin sprite 2 to sprite 1.

    You only need to do this once, not every tick - currently you keep pinning sprite 2 to sprite 1 from its current position continuously so it stays where it is

  • You're welcome

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi auramatt,

    For this you're best off saving an array to Local Storage. I've been meaning to work out how to do this for myself for while so thanks for the push <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> I've created an example here:

    https://www.dropbox.com/s/2fqk21sm87kma ... .capx?dl=0

    I haven't had a chance to add comments to it (in a bit of a rush) and it can probably be tidied up a bit/made more versatile, but it does the job. Try running it a few times to see how it stores the hiscores for each level and then updates them when you next run the project.

    There are also a few tutorials that might help you with other ways to go about it; the second one uses the old Web Storage but you can convert it for Local:

    https://www.scirra.com/tutorials/307/ar ... ers/page-3

    https://www.scirra.com/tutorials/581/to ... and-arrays

    Subscribe to Construct videos now

    Let me know if you need a better explanation and I'll upload a new version with comments. Hope that helps! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • A relatively simple fix would be to put a large invisible sprite over the area that you want to register analogue stick input and do your input check on that. Unless you're planning on adding in extra buttons, I'd probably do the same for the shoot button as well so that the user doesn't miss the shoot inputs.

  • Check out this tutorial, I reckon it's got you covered:

    https://www.scirra.com/tutorials/813/how-to-make-fluids

  • PixelByPixel Certainly would, been a fan of Conway's Game of Life since way back - I get why you wanted the grid check now

  • If you are doing the visibility check on the click correctly already, you might want to check that the object is actually set to not visible and not just opacity at 0 - I believe the latter will still register as visible. Check in the debugger to confirm.

  • mekonbekon Thank you man.

    I don't really understand your capx, the pieces location are in their specific anchor just like my, yellow piece are in yellow anchor, red piece in red anchor and so on.

    What I wish is every time i run the game the pieces go to a random anchor, a simple formula for Y would do it, I still trying to figure her out but she is making herself difficult!

    If you rerun the capx each time you'll see that the order of the anchors and pieces do change.

    If you want to keep the anchor order the same, just add a line of anchors to your layout then spawn the pieces in a similar way to how I've outlined on top of the anchors. Add an instance variable to the anchor (e.g. pieceID and do a check for overlapping with a piece: if overlapping set the anchor variable to the piece frame number.

    As I mentioned above, you don't really need the anchors: you can put all the piece frames on a single object, spawn multiple pieces in a random order and then save their initial position values to instance variables, saving you having lots of extra objects in your layout.

    Hope that helps

  • Here's a way to shuffle the pieces and apply them to anchors - you can move the pieces and see the anchors underneath.

    If you're just using single frames for the pieces then I'd suggest sticking all the images as frames in one animation.

    https://www.dropbox.com/s/odo9p34kstf2r ... .capx?dl=0

    Notice that you don't really need the anchors if you use this method, you can just spawn all the pieces. You can then assign a couple of instance variables to the piece to record each instance's starting X,Y position, then you can use those values if you need to reposition them on the sliding bar.

mekonbekon's avatar

mekonbekon

Early Adopter

Member since 9 May, 2014

Twitter
mekonbekon has 13 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies