game_end


Description

With this function you can end the game (and the Game End Event will be triggered). This will not happen instantaneously, but rather at the end of the current step, so any code you have in the same step after this function has been called will still run. Please note that this function has the following restrictions:


Syntax:

game_end();


Returns:

N/A


Example:

if keyboard_check_pressed(vk_escape) game_end();

This would end the game if the player presses the "escape" key.