0 Favourites

How do I make a profile for the player ?

  • Hi

    Soon i will finish my first game 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

  • 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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)