Snapping after Drag and Drop
usma1000
Member Posts: 1
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.
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
In my game, is the behavior when you drag the small numbers onto the big ones similar to what you are trying to achieve?
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?
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!