# Highscores/Timelimit

Get help using Construct 2

### » Tue Apr 17, 2012 12:06 pm

Hey, i want to make high score system in my game, but it is little tricky, or maybe it`s not:).

So, on every level a have time limit. If i have 20 seconds for the first level, but i finish the level in 15 seconds than i would like to add 500 points to score or the seconds that left multiplied by 100. I like to do that on every level and then to calculate the seconds left from all levels. So for example if from all 10 levels there are 55,9 seconds left than add to score 5590 points.

Any suggestions will be gladly appreciated.
B
10
S
3
G
3
Posts: 54
Reputation: 3,337

### » Tue Apr 17, 2012 5:23 pm

In this case I would do something like this

Global Variable - Score = 0
Global Variable - HighScore = 0
Global Variable - IsRunning = 1
Global Variable - Time = 30

Everytick
IsRunning = 1    Update TextScore = 'score: ' & Score
@This will update your scores

Everytick
Score > Highscore
IsRunning = 1      set global variable HighScore - Score
Set Highscore - "Highscore: " & Highscore
@This will update your highscores

Every (int)1second
Is Running = 1 (-1 to Time)
@This will track how much is remaining, even if the game ends early

(end of game) set IsRunning = 0
@However you end your game set this to stop all the timers and scores from runnin

This will save your scores including high score.

Set text finalscore = highscore + Time(x10)

Hope this makes sense, if not I'm sure someone could offer you a more clear version.
B
13
S
2
Posts: 87
Reputation: 1,244

### » Wed Apr 18, 2012 9:58 am

I can`t really understand this events. But you gave me other similar idea.legora2012-04-18 10:35:53
B
10
S
3
G
3
Posts: 54
Reputation: 3,337