Quote from: Snake on Fri 19/10/2007 19:31:18
I wouldn't have the foggiest idea where to start writing a high scores script from scratch. Yeah, I could display the score in a seperate room (a monkey with ADHD could do that) but writing multiple scores in chronological order (while being able to allow the player to write a nickname) is confusing for me.
Usually high scores are just in order of the scoring, not chronological.
Break the problem into smaller parts:
1. You need to be able to read and write to a file. You need to be able to store numerical data (the score) and textual data (the nickname).
2. You need to be able to sort scores in order of value. I don't have my AGS help manual open in front of me, but there is no doubt some way to sort things. (If there isn't, well -- you'd need to write your own sorting function. But for only 10 numbers or so that is pretty simple.)
3. You need to check if the current score (at the end of the game) is more than the smaller high score, and then ask for the nickname, and then see where it fits into the list of high scores, and then write it to the file.
Think about the format you want to use (try it unencrypted first), look at the help file functions for reading/writing files, and it should become more clear how to write the sort of thing you want to write. The best way to learn about programming is to try it yourself, and the best way to tackle any programming problem is to break it into small and discrete chunks! :-)