Hi! I liked this game, it's interesting. I am currently making a drag and drop card game and I am faced with a problem when I want to click on a card on top of a card and when I click, two cards are taken. I understand that this is a feature of the game maker engine . but I do not know how to fix this problem .please, if you can answer how you solved this problem, I will be grateful to you
Hi Mate, glad you liked the game. Here's how I would fix the issue you're having.
Have a controller object in charge of picking up.
When the player clicks it loops through all the cards to check if they're being clicked on.
If a card hasn't been picked up yet then pick it up. If it has then compare the depth of the card already held with the one trying to be picked up and drop the old one if it's lower.
OR you can loop through all the cards from highest card to lowest and stop at the first card which is under the mouse. You'd just have to sort all the cards be their depth for that.
Hope one of those ways works for you!