This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.
The Console is a panel normally hidden from view. Its usage is twofold:
- It displays informational, warning and error messages that occur during gameplay, alerting players of things like low diskspace, broken levels, ...
- It helps debug the engine and test levels by allowing direct execution of Squirrel script commands (see Scripting reference)
The Console pops into view for a short time whenever new messages are printed. To review old messages and enter commands, the console needs to be activated.
To do so, you will have to run supertux using the --console option. The key assigned to opening the console can be changed in the keyboard setup as soon it is activated. (Default of ^) Use --noconsole to disable it again.
To disable or enable the console if you don't want to pass command line parameters, you will have to edit the edit the SuperTux configuration file. Depending on your operating system, this varies:
|Operating System||Config file location|
|Mac OS X||Home/Library/Application Support/SuperTux/config.txt|
|Mac OS X Leopard||%USERPROFILE%/.supertux2/config|
You may have to enable viewing hidden files or folders. Anyway, open the file up with a text editor, and
will enable the console, and
will disable the console. Find one to change it to the other.
Following is a list of predefined scripts to run in the console:
|flip()||Flips the current level vertically. Make sure you have something to stand on!|
|grow()||Grows Tux into big Tux|
|shrink()||Shrinks Tux into little Tux (currently broken)|
|fire()||Gives Tux the fire powerup|
|ice()||Gives Tux the ice powerup|
|lifeup()||Gives Tux 100 more coins|
|finish()||Finish the current level|
|worldmapfinish()||Finish all the levels on the worldmap|
|functions(x)||Gives a list of the functions available in an object or table. If no argument is given, this prints out the functions in the root table.|
The console currently supports autocomplete, through use of the tab key, line editing with left/right/home/end/delete keys, and viewing past messages using the up, down, page up, and page down keys. To run a command, simply press the enter or return key.