Simple Timer issue

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
darkdemonalex
Posts: 1
Joined: Tue Jan 24, 2012 3:25 am

Simple Timer issue

Post by darkdemonalex » Fri Feb 10, 2012 2:48 am

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!!

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Simple Timer issue

Post by Dixie » Fri Feb 10, 2012 4:11 am

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
Attachments
time.livecode.zip
(1.14 KiB) Downloaded 315 times

flintGA2c5a
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 61
Joined: Tue Jan 24, 2012 10:35 am

Re: Simple Timer issue

Post by flintGA2c5a » Fri Feb 10, 2012 2:33 pm

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

Post Reply