Need help with HighScore

Discussion and feedback on Construct 2

Post » Mon Apr 14, 2014 2:02 am

DUTOIT wrote:@zenox98, @rekjl,

:oops: Lol, thanks guys.


@Hardty,

Webstorage only saves players score, and cannot be accessed by other players. Webstorage is not what you think it is. It is saving to players computer only.

If you want global webstorage, you need an external database, which is going to be far beyond your current skill level. There are tuts on it using mysql (I think) but that is pretty advanced an requires actual programming knowledge.

I don't understand your highscore1 and highscore2,
But highscore is highscore and should be over written with new highscore.
Highscore = 5000
PlayerScore >= Highscore then Set Highscore = PlayerScore else Leave Highscore = Highscore.

But like i said, global highscore cannot be stored using anything in construct, you need to use external storage options.

Edit:
Global Highscore is players wanting to beat the best score of the game.
or
Player wanting to beat his current best score? which you don't need an external database. Because if you just want player competing against his best score then, webstorage will work.

Edit 2: Added 2 files. One is highscore example. As you can see it stores highscores, but the high scores are not persistent, when you exit game, you loose highscores.
You need to save them to webstorage to make them persistent.
So attachment to is something I did for someone else, it is saving gold coins to webstorage.

Your homework assignment is to make the highscores save to webstorage. Oh, I will not be checking your homework, because in life, you have to be your own teacher and student.

Saving to external database is too advanced for you, so I am not even going into that.

:mrgreen: nice tutorial man :mrgreen:
i think when i use webstorage,i must use different name with another capx webstorage.
like my tibiame hops 1 game,thats using webstorage too.. its named highscore,then,i use the same name at another capx,but when i test playing another capx,the score is showed from tibiame hops 1 highscore. :cry:

example :
TibiaME Hops 1 = Highscore : 200
Another capx = Highscore : 200 / sometimes it will be NaN
~Everyone can make GAMEs~
B
54
S
10
G
1
Posts: 411
Reputation: 5,655

Post » Wed Apr 23, 2014 8:36 am

DUTOIT wrote:@zenox98, @rekjl,

:oops: Lol, thanks guys.


@Hardty,

Webstorage only saves players score, and cannot be accessed by other players. Webstorage is not what you think it is. It is saving to players computer only.

If you want global webstorage, you need an external database, which is going to be far beyond your current skill level. There are tuts on it using mysql (I think) but that is pretty advanced an requires actual programming knowledge.

I don't understand your highscore1 and highscore2,
But highscore is highscore and should be over written with new highscore.
Highscore = 5000
PlayerScore >= Highscore then Set Highscore = PlayerScore else Leave Highscore = Highscore.

But like i said, global highscore cannot be stored using anything in construct, you need to use external storage options.

Edit:
Global Highscore is players wanting to beat the best score of the game.
or
Player wanting to beat his current best score? which you don't need an external database. Because if you just want player competing against his best score then, webstorage will work.

Edit 2: Added 2 files. One is highscore example. As you can see it stores highscores, but the high scores are not persistent, when you exit game, you loose highscores.
You need to save them to webstorage to make them persistent.
So attachment to is something I did for someone else, it is saving gold coins to webstorage.

Your homework assignment is to make the highscores save to webstorage. Oh, I will not be checking your homework, because in life, you have to be your own teacher and student.

Saving to external database is too advanced for you, so I am not even going into that.


i'm sorry,forget to say thanks :oops: .. Thanks man :mrgreen:
~Everyone can make GAMEs~
B
54
S
10
G
1
Posts: 411
Reputation: 5,655

Post » Mon Apr 28, 2014 5:22 am

THANK YOU SO MUCH FOR THIS! I have been searching all over the Internet for help on the high scores, and this actually worked! Thank you Dutoit!
B
4
S
1
Posts: 5
Reputation: 364

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Cliffu and 12 guests