Place the picture in order Game

0 favourites
From the Asset Store
An educational game for counting pictures. An easy to use template for developers to build larger games
  • NECROKRIEG

    Follow this link as thread continued there.

    The example there should steer you in right direction.

    scirra.com/forum/sprite-shuffling-like-on-ios-home-screen_topic76320_post460159.html

  • NECROKRIEG

    DUTOIT

    Haven't had a chance to download your Capx yet and take a look as have had my head in this one

    dropbox.com/s/p6h7fn700hano4l/Sequencing%20Landscape.capx

    Feel free to have a route around, but I do need to comment it out a bit more

    Thanks Plinkie and Dutoit - am really getting into this now thanks to the earlier help you gave me :-)

  • This was an earlier attempt - covers the logic that Plinkie describes

    dropbox.com/s/oomfa4jq79r9p06/Numbers%201.1.capx

    Basically you select a number at the top and drag it over the numbers at the bottom - if there is a space it snaps, if it is occupied it sends the occupying number back to where it started and then takes the place

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Thanks sainsy &DUTOIT :)

    Iv tried out quit a few things.

    You can now snap to an object and snap out of it. (I couldn't before)

    BUT When I overlap a card with another they still stick underneath each other.

    Any suggestions to make them not stick but still allow them to overlap ?

    Capx

  • damn timeout, lost my post ...

    anyway:

    create variables for the sprites

    "start_X", "start_Y",

    then, make an action "if there are more than 2 correct sprites on spot A"

    return bottom sprite to start_X, start_Y

    you could also create a third variable "am I on bottom?"

    to let the sprite know if it will be the one returning to starting spot.

  • NECROKRIEG

    Sorry couldn't open Capx - u r using v148, i just tried downloading the beta and my anti-virus is kicking it out :-(

    So without seeing the Capx I'm kinda shooting in the dark - out of interest are u using families. I got round the problem u describe by having the card, and then the same card in a family. U can then detect event where card is touching card family and create actions against each one (so card snaps to new position, card family returns to original place).

    I will have a better look when i have sorted the antivirus thing out

  • Thanks sainsy ghost DUTOIT

    I worked it out! :D

    The cards now don't stick under each other when they overlap. I lerped the green card so it smoothly snaps back when you let go. Take a look, it might be of some use. It feels good

    Capx

    I was wondering whether anyone knows how to make a grid in a way you can overlap cards (as if they have been dealt out)

    <img src="https://dl.dropboxusercontent.com/u/20299415/capx-forum/Pictures/cards-overlapping.png" border="0">

    I don't want the cards to cover up each other if they are in the same slot. I tried overlapping the grid but the cards don't follow suit. (excuse the pun)

  • maybe using z-order, i think there's already a capx on the arcade about this.

  • I haven't installed latest beta, but agree with ghost, z-order is probably best latest card being on top

  • Great stuff guys, thanks for pointing me in the right direction!

    Z Order Capx

  • Hi

    I'm really stuck on how to make an 'empty' slot.

    I basically want the player to put a Blue card in a slot. Once the card fills that slot to '1' no more cards can be placed there. If a second card is placed on top of that 'full' slot the card should automatically snap to an empty slot. How can I pick an empty slot instance? I tried comparing an instance variable to pick any slot below 1 (empty) but it glitches. :)

    Capx

  • NECROKRIEG

    I have created the following functionality. Hopefully this is helpful, I thought this would work better than choosing a random empty slot. If you definitely want it to choose the nearest empty slot then I can help set up some logic but it's late now : P

    • On drop, card goes to a slot if overlapping

       - if slot is full then card will go to original starting position

       - if slot is empty then card will be placed in slot

    capx

  • NECROKRIEG

    Please review my earlier Capx - it does exactly this

  • sainsy Oh yes, thanks. I reviewed it again. Im going to keep it simple. I'll go through Kittiewan's tutorial once more.

    , thanks that's almost what I was trying to achieve. Im going to stick to this logic. But there's Just one bug bear; sometimes the empty slot repels a card. It's an intermittent problem happening roughly 1 in 4 goes (I refresh game after a go), other times all cards snap in place.

    Iv also learnt how to make a menu slide in like an Angry Birds win screen if you need it, its in this Capx

  • NECROKRIEG

    Thinking about the process I went through - you may also want to consider how the objects detect the overlap.

    I went through hell because the empty slots were close together, and it would sometimes snap to the wrong slot if it was overlapping two slots. I got round this by changing the hot spot are (bottom icon on left in picture editor) so that the hotspot is just a vertical sliver down the centre of the sprite. Took a bit of trial and error but works just fine.

    Might save you a couple of days head-banging further down the line

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)