Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
Tutorial showing a list of display functions. tutorial, custom code, display functions

Public Functions:Display Functions

Display functions provide shortcuts to functions for controlling display elements and printing to the display.

  • MyGame.clearDisplay()   Boolean Clears the user's input and display output.
  • MyGame.clearInput()   Boolean Clears the user's input.
  • MyGame.clearOutput()   Boolean Clears the display area of any output.
  • MyGame.hideStatusbar()   Boolean Hides the game's statusbar.
  • MyGame.print() {String} msg a string to be printed n/a This method prints any string that is provided to the game display.
  • MyGame.printExits()   Boolean This method prints a formatted list of available exits directly to the player.
    Expand for example

    Code

    MyGame.printExits();
    

    Output

    You can go out to the Playground, north to the Pool Room, down through the hole in the ground, south, east, or west.
  • MyGame.printRoom()   Boolean This method prints the current room name, description, and contents, the same as when a player enters a new room.
    Expand for example

    Code

    MyGame.printRoom();
    

    Output

    Lost in a Sandstorm The ferocious winds continue to buffet, blind and deafen you, pushing you deeper from safety. Is there some clearing to the north? You can see a fox here.
  • MyGame.showStatusbar()   Boolean Show's the games statusbar.