System score

Get help using Construct 2

Post » Mon Aug 04, 2014 11:57 am

Looking for a simple system of punctuation, where you go from level to level keeping the punctuation, and if you return to the same level the highest punctuation is saved, but does not accumulate.
Is there any tutorial? or any ideas?
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Mon Aug 04, 2014 12:09 pm

You could use Webstorage to save the highscore for each level.

There's a simple tutorial on Webstorage objects here:

https://www.scirra.com/tutorials/266/we ... nformation
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 664
Reputation: 3,855

Post » Mon Aug 04, 2014 2:08 pm

Not only save it, but as I make a highscore to accumulate in the other levels.

Example: From the main menu put Total score: x
But only the best of each level punctuation stay
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Mon Aug 04, 2014 5:43 pm

:roll: :roll:
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Mon Aug 04, 2014 6:04 pm

as I can put two scores to join?
Set text to "TotalScore:" & Scorelvl1 & Scorelvl2 :(
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Tue Aug 05, 2014 4:50 pm

I'm not sure what exactly you want, but if I get it right you want to have the high score for each level and a total score that is the sum of all level scores, right?

In this case, you'd have several Webstorage objects (scoreLvl1 ... scoreLvlN). Every time a player finishes a level you'd check if their score for the level is higher than the Webstorage value for that level. If it is, you'd set the Webstorage to the new value.

For the total score you'd just use the sum of every Webstorage object.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 664
Reputation: 3,855

Post » Tue Aug 05, 2014 5:47 pm

Go mess I have mounted, create an example that adds the punctuation of the two levels but only keeps a level xD difficult is this :(
https://www.dropbox.com/s/iqc78wht3huhv ... .capx?dl=1
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Tue Aug 05, 2014 8:36 pm

As I mentioned earlier, you must use one Webstorage variable for each level highscore. Right now you're only using storedScore.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 664
Reputation: 3,855

Post » Wed Aug 06, 2014 12:05 pm

Took about an hour and nothing, No saved level 2, someone could modify my CapX?
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Wed Aug 06, 2014 6:49 pm

:(
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 22 guests