How do I make a profile for the player ?

Get help using Construct 2

Post » Wed Sep 24, 2014 12:08 pm

Hi
Soon i will finish my first game :D just a few things is missing. first i want to make a profile for the player so when he win the game he can get his score or points in his file (( how many time did he win and lose)) also this file can have a photo ((Avatar)) of the player
B
4
S
1
Posts: 18
Reputation: 395

Post » Wed Sep 24, 2014 12:26 pm

Sounds like you are talking about local highscores rather than through the internet. You can store this inforamtion using the Webstorage object. Use localStorage rather than sessionStorage so that it saves semi-permanently.
B
32
S
6
G
2
Posts: 317
Reputation: 2,801

Post » Wed Sep 24, 2014 1:03 pm

make the profile with the picture ( avatar ) and the texts to show the wins and loses.
then test if the the value exists in the local storage , if it is the first time played , get the photo from the player , using the file chooser or using the user-media save the image URL to and another value for how much played , another value for how much wins , you don't need another value for loses because loses = played - wins.
if the value exists already , just add the 1 to wins and 1 to played or don't add to wins if he lost.
B
12
S
6
Posts: 118
Reputation: 1,466

Post » Wed Sep 24, 2014 2:24 pm

warville wrote:make the profile with the picture ( avatar ) and the texts to show the wins and loses.
then test if the the value exists in the local storage , if it is the first time played , get the photo from the player , using the file chooser or using the user-media save the image URL to and another value for how much played , another value for how much wins , you don't need another value for loses because loses = played - wins.
if the value exists already , just add the 1 to wins and 1 to played or don't add to wins if he lost.

This is good but do you have video guide ? because I'm new to C2
B
4
S
1
Posts: 18
Reputation: 395


Return to How do I....?

Who is online

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