I have a simple script that adds 1 point to a GUI counter whenever the screen is touched, which is perfect for my game, but I want the highscore to be saved and displayed.
I am unable to understand or find anything at my noob level about this.
When my player dies, the level is reloaded, so have that in mind.
All I can do is add your name to the credits and see you as a hero, lol.
Please write this to my script, I am begging from the depths of my soul.
var score : int;
function Update () {
if(Input.GetKeyDown("mouse 0")){ //Player kills the dragon or spaceship or whatever
score += 1; //increase the score
}
guiText.text = score + " "; //Display the score to the user!
}