(alert: String) → Command

This macro produces a Command that, when evaluated, shows a browser pop-up dialog box with the given string displayed, and an “OK” button to dismiss it.

Example usage:

(alert:"Beyond this point, things get serious. Grab a snack and buckle up.")


This is essentially identical to the Javascript alert() function in purpose and ability. You can use it to display a special message above the game itself. But, be aware that as the box uses the player's operating system and browser's styling, it may clash visually with the design of your story.

When the dialog is on-screen, the entire game is essentially “paused” - no further computations are performed until it is dismissed.

See also:

(prompt:), (confirm:)