Top-Down Drift Racing Game

Get help using Construct 2

Post » Thu Mar 01, 2012 1:35 pm

As you can see from the title I'm trying to create a top-down drift racing game and I have most of the features I want,but I'm stuck with posting high scores. I want to be able to finish the race after three laps and calculate the time for the three laps combined and be able to show the best time of all three laps on a high scores table. Can anyone help me out? Thanks in advance.
B
15
S
2
G
1
Posts: 15
Reputation: 1,282

Post » Thu Mar 01, 2012 5:50 pm

Hmm. I am not quite sure what you want. Is your trouble in calculating the high scores? Is it in displaying them or storing them?

Do you want to only display the user's own scores or an actual global high score table?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Mar 01, 2012 6:00 pm

I don't know if there's an internal stopwatch kind of thing I've missed, but could you not have a global variable and every 1 second add 1 to it.

Then call back the total and display it in numbers?
ImageImage
Mr. Green - Platform/puzzle game out now!
B
24
S
7
G
1
Posts: 222
Reputation: 3,325

Post » Fri Mar 02, 2012 1:14 pm

@sqiddster Yeah I just want to calculate the time it took to complete three laps and put that time in a high score table, and for now if I can just put the user's own score table that would be great.
B
15
S
2
G
1
Posts: 15
Reputation: 1,282

Post » Fri Mar 02, 2012 1:14 pm

@FredQ I have a global variable for the clock but I don't know how to get the times for each lap. Do I have to put a separate global variable for the high score table? I'm new to using Construct2 so I'm not exactly sure how to use the global variable stuff.
B
15
S
2
G
1
Posts: 15
Reputation: 1,282

Post » Fri Mar 02, 2012 1:17 pm

Just an idea: What about setting a variable for each lap? In this case, you know the time for each single lap and you can easily add those values up to a total time.

4 Variables are needed in this case:
Lap - Integer (to track which lap the player currently is)
Lap1 - Integer (Time in seconds of the first lap)
Lap2 - Integer (Time in seconds of the second lap)
Lap3 - Integer (Time in seconds of the third lap)

I am pretty sure that there are better solutions, but I am new with this as well and this is just something that would be easy to do :)
B
42
S
9
G
6
Posts: 437
Reputation: 5,626

Post » Fri Mar 02, 2012 1:24 pm

@Ubivis Would that be like what FredQ said to add a global variable that counts the seconds and adds it up when I complete a lap? Like adding a separate global variable for each lap to count the seconds for that lap only?
B
15
S
2
G
1
Posts: 15
Reputation: 1,282

Post » Fri Mar 02, 2012 1:25 pm

hmm, right... it is equal :)
B
42
S
9
G
6
Posts: 437
Reputation: 5,626

Post » Fri Mar 02, 2012 1:29 pm

@Ubivis Do you know how I can do that?
B
15
S
2
G
1
Posts: 15
Reputation: 1,282

Post » Fri Mar 02, 2012 1:52 pm

I set up a quick and dirty demo :)

www.gogwiki.com/temp/LapDemo.capx

Hope this helps :)
B
42
S
9
G
6
Posts: 437
Reputation: 5,626

Next

Return to How do I....?

Who is online

Users browsing this forum: benajad, Braus, R0J0hound, shinkan and 24 guests