hi all! I am making a concentration style game, that matches states & capitals. Anyway i made a simple timer that is supposed to start when the first card is flipped over. The problem I’m having is that I don’t know where to put the function for the timer. If i put it within the function that checks for which card it flips it doesnt work, if i put it in the first frame, it plays on the first frame. here is the code that i wrote:
startTimer = function (timeMe) {
timer = getTimer();
ms = timer%1000;
sec = ((timer-ms)/1000)%60;
min = Math.floor(timer/60/1000);
if (sec<10) {
zero = 0;
} else {
zero = “”;
}
};
I’ve tried setting a boolean property, but that moves the timer with each time a card is flipped. If anyone could provide any insight that would be great. Sorry for being so verbose!