⇐ Index
ShowGameMessage(<-messageID <-button0Text <-button1Text <-pauseGame <-messageChannel)
Shows a game message by message key. A game message is a popup message that appears at the top of the screen.
If a button is shown, a message will be sent when the button is pressed. A variable named '_DATA' will contain either a 0 or 1 to indicate which button was pressed.
In order to allow the player to close the message, a script must be registered for the message channel specified using RegisterforMsg and contain a CloseGameMessage instruction in the callback function, with the parameter set to “True” The callback function need not be the same script as the script making the call.
If a message is already showing, then calling this function will do nothing. If you want to replace the message, you must first call CloseGameMessage if there is already a message showing.
Note: You can use “\n” to create a line break in the button text.
ShowGameMessage("MyMessage" "Yes" "No" true "GameMessageCallback") :Once RegisterForMsg("GameMessageCallback" "GameMessageCallbackFunction") :GameMessageCallbackFunction <-_DATA ->result if (<-result eq0) print("Button 0 Pressed") else print("Button 1 Pressed") endif CloseGameMessage(true)