Adds a name and score to the internal high score list.


GML Code Example

highscore_add(str, numb);

Argument Description
str The string (name) to attribute the score to
numb The number (score) to add.

Returns: N/A


With this function you can add a name and a score to the internal global high score list. There is no need to check the value to see if it is high enough to enter into the score list as GameMaker: Studio will only store those values that are greater than the tenth position stored.


GML Code Example

if lives = 0
    highscore_add(global.Name, score);
    score = 0;

The above code will check the lives and if they are set to 0, it will add the current score and the string held in the global variable "Name" into the high score list, before finally setting the score to 0 and sending the player to the room indexed in "rm_MainMenu".

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here