The cards in my game get randomly placed at cardholders. Now I would like that when a card is dragged above another card and the click is finished that two cards get swapped. Would any one have an idea how to do that?
Store the initial position of the card when you grab it, and if you release click while it is in collision with another card, move the first to the position of the second and move the second to the stored position of the first.
how do i store the initial position of the card?
When click is pressed, write the X and the Y of the object in scene variables.
Strugling with the same issue. Gruk may you please share a screen of how its done? THX
Also following because the last game engine had a horrible forum with cocky people who wouldn’t help those of us who do not know. So I am very interested in knowing if this is the right game engine I should use based on the overall feedback.
Why scene variables rather than object variables within the cards themselves?
It doesn’t really matter.
If you need to swap several cards, then using object variables makes sense. If you only need to swap two cards, using scene variables seems easier.
@Eny I don’t have any, but it’s quite straightforward. Read what I wrote above and convert everything to actions and conditions. Share a screenshot if you’re stuck