x


high score script?

Hello. This is the script for the scores in my game. It uses the currently selected combination of options to set a unique integer, so that each combination has its own high score.

    function Update () 
    { var Arcade : String = System.String.Format("{0}{1}{2}_score", Arcade.ModeInt, Arcade.DifficultyInt, Arcade.CharacterInt);
        PlayerPrefs.SetInt(Arcade, Stats.Score);
 }

How would I combine it with this script from the wiki(array prefs)? I want to be able to store more than one score for each option combination so I can have a high score table. Thanks.

var myScores = new int[10];
for (i = 0; i < myScores.Length; i++)
    myScores[i] = i+1;
if (!PlayerPrefsX.SetIntArray("Scores", myScores))
    print("Can't save scores");
more ▼

asked Dec 27 '10 at 08:08 AM

Tyler 2 gravatar image

Tyler 2
1.1k 211 246 264

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x802
x273
x2

asked: Dec 27 '10 at 08:08 AM

Seen: 1453 times

Last Updated: Dec 27 '10 at 08:08 AM