This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| 4rpl:commands:showgamemessage [2021/01/08 16:01] – external edit 127.0.0.1 | 4rpl:commands:showgamemessage [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ~~NOTOC~~ | ~~NOTOC~~ | ||
| < | < | ||
| + | |||
| + | <WRAP tabs> | ||
| + | * [[4rpl: | ||
| + | * [[4rpl: | ||
| + | * [[4rpl: | ||
| + | * [[4rpl: | ||
| + | </ | ||
| ====== ShowGameMessage ====== | ====== ShowGameMessage ====== | ||
| - | ShowGameMessage(< | + | ShowGameMessage(< |
| ===== Description ===== | ===== Description ===== | ||
| - | Shows a game message by message key. A game message is a popup message that appears at the top of the screen.\\ | + | Shows a game message by message key. A game message is a popup message that appears at the top of the screen. |
| - | 'messageID' is the ADA message ID to show. Create a message using the ADA message editor, and reference it via it's ID.\\ | + | |
| - | The 'button0Text' | + | ? messageID |
| - | Set 'pauseGame' to true to auto pause the game.\\ | + | : the ADA message ID to show. Create a message using the [[cw4: |
| - | The ' | + | ? |
| - | If a button is shown, a callback | + | : |
| - | 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.\\ | + | ? button1Text |
| - | You can use "\\n" to create a line break in the button text. | + | : |
| + | ? | ||
| + | : true to auto pause the game. | ||
| + | ? messageChannel | ||
| + | : the name of the message channel | ||
| + | | ||
| + | If a button is shown, a message | ||
| + | |||
| + | In order to allow the player to close the message, a script must be registered for the message channel specified using [[4rpl: | ||
| + | |||
| + | 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: | ||
| ===== Examples ===== | ===== Examples ===== | ||
| Line 19: | Line 38: | ||
| ShowGameMessage(" | ShowGameMessage(" | ||
| - | : | + | :Once |
| + | RegisterForMsg(" | ||
| + | |||
| + | : | ||
| < | < | ||
| if (< | if (< | ||
| Line 26: | Line 48: | ||
| print(" | print(" | ||
| endif | endif | ||
| + | | ||
| </ | </ | ||
| + | |||
| + | === See also === | ||
| + | |||
| + | *[[cw4: | ||
| + | | ||
| < | < | ||