You basically need to get it so that every active object representing a card has an alterable value that shows which group it belongs to, and that there are only two cards in each group. Then when two cards are selected you just check if they share this value, and if so remove them.
In practice this might be more complicated than you expect. Short of just giving you the code, it's hard to just tell you how to do it. First try yourself and then come up with some more specific questions -- they're generally easier to answer.
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
14th May, 2004 at 21:04:41 -
Here's some easy code but it'll be hard with alot of cards.
Start of frame:
* pick a card at random
+ card.dir = 1
+ card.alt a = dir
* pick a card at random
+ card.dir = 1
+ card.alt a = dir
If player clicked on card + counter1 = 0.
Set counter 1 to card.alt a
If player clicked on card + counter1 > 0.
Set counter 2 to card.alt a
counter 1 > 0
+ counter 2 > 0
+ counter 1 = counter 2
+ Find all cards with alt a = counter 1:
Destroy.
That code is very basic and won't really work . But it's just meant to give you an idea of how it works.