show_question

Displays a pop-up question.

Syntax:

GML Code Example

show_question(str);


Argument Description
str The string to show in the pop-up question.


Returns: Boolean


Description

This function creates a pop-up message box with two buttons for "Yes" and "No". It returns true or false depending on which one of the two buttons the user presses.

NOTE: THIS FUNCTION IS FOR DEBUG USE ONLY.


Example:

GML Code Example

if score > 500
    {
    if show_question("Continue to next room?")
       {
       room_goto(rm_Level2);
       }
    else game_end();
    }
 

The above code will check the score and if it is over 500, it will ask the user if they wish to continue or not and if the "yes" button is clicked it will go to another room, but if the "no" button is selected it will end the game.





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