Page 1 of 1

Simple Timer issue

Posted: Fri Feb 10, 2012 2:48 am
by darkdemonalex
Hi everybody,

My name is Alex. I'm sorry if sometimes i don't write very well but i'm italian and I just studied english at school.
I'm at the very beginning in LiveCode and the following question may be a stupid, but i have to study it in another language and it's not very simple to me.

Here's the "issue". When i push the start button, i'd like a timer to start being hidden, the player can't see it. The timer should be in seconds. When the player comes to the final card because he won, i'd like a message to be shown, telling him the time he took to win. Then i don't know how to reset the game when he presses the restart button.

I think that i should understand better the logics of LC at first, but as I said, it takes me a lot of time and work because of my different language.

Anyway LC is amazing.

Thanks for the help!!

Re: Simple Timer issue

Posted: Fri Feb 10, 2012 4:11 am
by Dixie
darkdemonalex...

I have attached a stack that will show you 'simply' how to calculate the difference in seconds between 'starting' and stopping'...

Hope it helps,

Dixie

Re: Simple Timer issue

Posted: Fri Feb 10, 2012 2:33 pm
by flintGA2c5a
Very nice and simple example.

From looking at your code I realized I had actually misused 'the seconds' earlier as I now figured it is from the eon as opposed to wait for 2 secconds. I was wondering why the seconds > 5 was giving me a instant result :D