2 questions: End level score tally, and keep time.

Get help using Construct 2

Post » Wed Aug 28, 2013 4:14 pm

I'm wonder how I would keep time on how long you're playing the level. Take this for example from Sonic 1:



And how would I make the score add up to how long you've been playing and how many rings you have at the end? Like this:



B
10
S
4
G
1
Posts: 159
Reputation: 1,933

Post » Wed Aug 28, 2013 4:29 pm

Make a global variable named timer
Make a global variable Time Bonus and set it to the amount of seconds the level should take.

system every 1 second add one to timer
set text - "Time: "&Floor(Timer/60) & ":" & right("00"&Floor(Timer%60),2)

at the end of the level:
system comape two values : time bonus-timer > 0 - add something to score.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, Exabot [Bot], Yahoo [Bot] and 27 guests