end_match

Forces the match to end. All arguments are optional, and not providing any arguments will trigger overtime in the event of a tie. Any placements not supplied will be calculated normally. Use -1 in an argument if you want that placement to be skipped and calculated normally as well.

ArgumentTypeDescription
first:real[optional]
The winning player. Must be between 1 and 4.
second:real[optional]
The player in second place. Must be between 1 and 4.
third:real[optional]
The player in third place. Must be between 1 and 4.
fourth:real[optional]
The player in fourth place. Must be between 1 and 4.

Example, called from a stage’s article1_update.gml:

//This code will end the match as soon as a player touches the article, with the player who touched it automatically winning the match.
var touch = instance_place(x, y, oPlayer);
if touch != noone {
end_match( touch.player );
}