Timer Help

For questions about using Classic.

Post » Thu Jan 14, 2010 4:12 pm

I need to time how long it takes for you to complete my game, form start to end. Can someone explain (or give an an example) of a timer. I need help to report in seconds, and then display it the time.

Also is there a high score?
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Thu Jan 14, 2010 4:49 pm

The timer can be easily done by adding a value to a Global Variable at a specific interval ( for example, add 1 to "Seconds" every 1000 milisseconds ). To display it, you'll have to use the Text object (with the "Set text" action).

Making a high-score (local) requires you to work with the .ini object. Hang on, I'll post an example soon.
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Thu Jan 14, 2010 4:52 pm

You could also always add 1*timedelta to the timer variable.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Thu Jan 14, 2010 5:04 pm

Here it is:

http://www.gamma-beam.com/construct/highscore.cap

The highscore is saved on a .ini file.
Very easy to hack LOL!
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Thu Jan 14, 2010 8:11 pm

Great example for high score gammabeam !!!
Can you do one for the display time too please?
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Fri Jan 15, 2010 12:41 pm

I made a timer example for the topic here
viewtopic.php?f=3&t=4938&p=39184#p39184
hope this help you out.
B
21
S
4
G
4
Posts: 280
Reputation: 2,934

Post » Sat Jan 16, 2010 4:19 pm

That was a huge help toralord

THANK YOU!!!
B
28
S
8
G
8
Posts: 530
Reputation: 7,154


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest