PDA

View Full Version : matching game hlep


akschinas
01-03-2003, 03:14 PM
Hi!

If you would please offer some help with a matching game, I'd really appreciate it. I have 16 "cards" which can be flipped over, and if one matches the other, they dissappear. However, I can't for the life of me figure out how to trigger a statement "Congrats! You have won!" after they have completed the game and all of the cards have disappeared. Can someone please help?! Thanks in advance!

emergency_pants
01-03-2003, 03:35 PM
Set a variable at the start of the game that corresponds to the total number of pairs in the game.

Every time the player gets a pair correct, reduce that variable by 1.

put a message movieclip on the centre of the stage with two frames:

empty first frame, with a stop script.
congrats on the second frame, with a stop script.

when the 'pairs' variable reaches zero, tell the message movieclip to go to frame two.

When the game is restarted, move the message clip to frame 1.

Simon.

akschinas
01-03-2003, 04:59 PM
Thanks alot!

akschinas
01-05-2003, 01:15 PM
I'm confused on how to keep the variable counting the pairs. I understand how to set a variable, but I'm confused about the rest of it/ I've attached the game here. Thanks in advance!

akschinas
01-05-2003, 01:23 PM
I'm confused on how to keep the variable counting the pairs. I understand how to set a variable, but I'm confused about the rest of it. Thanks in advance!