game_end

Closes the game.

Syntax:

game_end();


Returns: N/A


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:


Example:

if keyboard_check_pressed(vk_escape) game_end();

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


Back: Miscellaneous
Next: game_restart
© Copyright YoYo Games Ltd. 2018 All Rights Reserved