game_end

This function ends the game and triggers the Game End Event.

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.

Usage Notes

 

Syntax:

game_end([return_code]);

ArgumentTypeDescription
return_codeRealOPTIONAL The return code of the application, defaults to 0.

 

Returns:

N/A

 

Example:

if keyboard_check_pressed(vk_escape) game_end();

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