Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by carter-carl30 · Jun 17, 2013 at 06:46 PM · javascriptarrayplayerprefsscorehighscores

Is there a decent tutorial for a local high score table (android)?

Hi, I have a highscore screen in my game. Which when the game ends it displays a simple highscore.

What I want to have is a few entries (say 5) eg: 1)john....999 2)bert....982 3)mike....663 4)frank.....432 5)ben....125 in a verticle list.

I have searched questions and forum, youtube, googled etc which keeps bringing me back to the same results which are not really clear or easy for a newbie to understand.

Can anyone help my with this or point me to a decent tutorial please?

I currently have this script to set my highscore:

 #pragma strict
 var countdownTimer : countdownTimer;
 
 function Update(){
 
 if (countdownTimer.seconds ==0);
 GameOver();
 
 }
 
 function GameOver () {
 
 if(Scorecounter.Counter > PlayerPrefs.GetInt("highscore"))
 
     {
         PlayerPrefs.SetInt("highscore", Scorecounter.Counter);
     }
 
 Application.LoadLevel(3);
 
 }

and this one to show it on the highscore screen (where I hope to display the highscore list):

 #pragma strict
 var highScore3dText : TextMesh;
 
 function Start(){
 
 highScore3dText.text = "High Score: " + PlayerPrefs.GetInt("highscore").ToString();
 
 }
Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image InfiniBuzz · Jun 17, 2013 at 07:13 PM 0
Share

Have a look on raywenderlich's website, theres a tutorial that contains a scorelist, see here: Raywenderlich Nothing but net 3/3 (scroll to "$$anonymous$$eeping Score")

Note: They use a finished script but maybe it gets you started or it already has everything you need.

avatar image carter-carl30 · Jun 18, 2013 at 05:20 PM 0
Share

Hi thanks for answering, i've had a look at that site but with it been in c# I can't understand it and I don't know how I would implement that into my script

avatar image carter-carl30 · Jun 25, 2013 at 11:55 PM 0
Share

can anyone help me with this please?

avatar image InfiniBuzz · Jun 26, 2013 at 06:54 AM 0
Share

hang on I can do something

before writing something for you, have you tried this: How do I make a highscore board?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by SubatomicHero · Jun 26, 2013 at 06:51 AM

Ok so lets break down what you want bit by bit. First you say you want a few entries maybe 5. So it sounds like you need a container of some kind.

You want to have entries like "Ben 125" and "Bill 500". My suggestion would be to use a generic dictionary container.

You also want to have the list displayed vertically. The GUI class enables you to stack elements vertically also. I'm not going to script it for you, just provide you the links to get started. Good luck!!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Sorting arrays? 1 Answer

PlayerPrefs not saving my variable value for HighScore System 3 Answers

Is it necessary to create an Array() to show high scores in PlayerPref? 1 Answer

Highscoring and changing scripts (Java/UnityScript) 1 Answer

PlayerPrefs HighScore problems, it doesn't work. 4 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges