Snapping after Drag and Drop

usma1000usma1000 Member Posts: 1
edited November -1 in Working with GS (Mac)
Hey guys,

I'm new to GameSalad. I'm trying to make a card game. I was able to make a drag and drop rule, but I need to make some changes.

In my game, the player has a hand, and in the playing field are 16 "slots" laid out in a grid. The player gets to pick up a card from his hand and place it in any open "slot" on the field. If there are no open card slots nearby, I want the card to go back to it's original location in the player's hand.

I have no idea how to do that. I tried creating an actor for each slot. Then I created a rule for the card that said if the card is dropped, and it overlaps one of the actors I created for slots, the card would move to the location of the slot. This is very buggy, and it chooses the wrong slots sometimes. Is there a better way to do this?

Any help would be very appreciated. I've tried looking online for help on this, but I came up with nothing. Let me know if you need more information. Thanks.

Comments

  • emf715emf715 Member Posts: 16
    If you have an iPad, check out my free game: Pico Firme Bago http://itunes.apple.com/app/pico-firme-bago-lite/id412344832?mt=8

    In my game, is the behavior when you drag the small numbers onto the big ones similar to what you are trying to achieve?
  • xyloFUNxyloFUN Member Posts: 1,593
    Thanks for that link John!

    I think i've looked at it already but for some reason, THAT is exactly would I would like to implement for my little music notes :)

    How do i download the source? When I right click and save, I get a .game file which GS can not open?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    xyloFUN said:
    Thanks for that link John!

    I think i've looked at it already but for some reason, THAT is exactly would I would like to implement for my little music notes :)

    How do i download the source? When I right click and save, I get a .game file which GS can not open?

    download the .game file like you did. Rename it and delete everything the name and the .game extension at the end. then rename it to whatever you want .zip, so say project.zip Then double click the zip file and the game project pops out

    :)
  • xyloFUNxyloFUN Member Posts: 1,593
    John!
    How are you?

    That has worked! OK, everything you say works ...

    Now I need to dissect it and see how I could reorganize the grid because then I could make my notes snap and appear nice on the screen ... sort of :)

    thanks and THANKS to firemaplegames for sharing and thanks to usma1000 for asking that question! :)
Sign In or Register to comment.