How to store highscore for android smartphone

0 favourites
  • 4 posts
From the Asset Store
GamePad Smartphone
$5.40 USD
40% off
Easily create a GAMEPAD for your mobile games by simplifying the movement of your characters on mobile devices.
  • hey there, i have create a matching games for android phone, it has done but the problem is i did not know how to store the high score when player done playing my games.

    There is anyone can help me. i need it to finish my study project.Help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Search function in the tutorials as well as in the how do I forum will find you a great deal of information.

    First hint, it has to do with the webstorage plugin and arrays.

    A score system in a tutorial. You can find even more tutorials and score system spread over the website.

  • The links posted by Kyatric will definitely be useful. You could also do some searches around the forum. You may just come across some useful information.

    noless

    I'll try explaining it to you in basic logic.

    If you plan to do just one "Best Score" for the user then you probably don't need arrays. Unless you want a leaderboard? Which I'm assuming you don't.

    You should use webstorage to store the value. Webstorage will remove the stored value if you clear you cache (I believe this is how it works). So its good for storing or saving values.

    Event>Action

    webstoreage>setlocalvalue will let you store the required value into a "key".

    you can then load value from the key to a global variable.

    For example:

    global variable num = 5;

    webstoreage set localkey "getval" to num;

    ->You now have the localkey "getval" which has stored in the value 5 from num.

    You can then load the key, and set num to this key by using a command like this:

    Set num towebstorage.localvalue("getval");

    num is now equal to the stored value in the key.

  • thank you Kyatric and retrodude it really useful. the tutorial really helping

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