This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.

Difference between revisions of "Console"

From SuperTux
Jump to: navigation, search
(Commands)
m (revert vandalism)
Line 19: Line 19:
 
Following is a list of useful scripts to run in the console:
 
Following is a list of useful scripts to run in the console:
 
{|
 
{|
|''1()'''||quits SuperTux
+
|'''quit()'''||quits SuperTux
 
|-
 
|-
|''2()'''||restarts the current level
+
|'''restart()'''||restarts the current level
 
|-
 
|-
|''3()'''||prints Tux' coordinates
+
|'''whereami()'''||prints Tux' coordinates
 
|-
 
|-
|''4_collrects(true)'''||shows a transparent hitbox image over badguys for debuging
+
|'''debug_collrects(true)'''||shows a transparent hitbox image over badguys for debuging
 
|-
 
|-
|''5()'''||lets Tux float around and through solid objects
+
|'''ghost()'''||lets Tux float around and through solid objects
 
|-
 
|-
|''6()'''||Kills Tux
+
|'''kill()'''||Kills Tux
 
|-
 
|-
|''7()'''||reverts Tux back to normal
+
|'''mortal()'''||reverts Tux back to normal
 
|-
 
|-
|''8()'''||Grows Tux into big Tux
+
|'''grow()'''||Grows Tux into big Tux
 
|-
 
|-
|''9()'''||Shrinks Tux into little Tux
+
|'''shrink()'''||Shrinks Tux into little Tux
 
|-
 
|-
|''q()'''||Gives Tux the fire addon!
+
|'''fire()'''||Gives Tux the fire addon!
 
|-
 
|-
|''w()'''||Gives Tux the ice addon!
+
|'''ice()'''||Gives Tux the ice addon!
 
|-
 
|-
 
|'''invincible()'''||Makes Tux invincible
 
|'''invincible()'''||Makes Tux invincible

Revision as of 17:06, 24 February 2007

SuperTux 0.3.x: This text describes features that can be found in SuperTux 0.3.0 or later

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.

By default no key is assigned to opening the console. This can be done by editing the SuperTux configuration file and adding a key binding for "console". For example, to activate the console using the tilde (~) key, you would add the following to the keymap section of the configuration file:

     (map
       (key 96)
       (control "console")
     )

Then, you will have to run supertux using the --console option.

Commands

Following is a list of useful scripts to run in the console:

quit() quits SuperTux
restart() restarts the current level
whereami() prints Tux' coordinates
debug_collrects(true) shows a transparent hitbox image over badguys for debuging
ghost() lets Tux float around and through solid objects
kill() Kills Tux
mortal() reverts Tux back to normal
grow() Grows Tux into big Tux
shrink() Shrinks Tux into little Tux
fire() Gives Tux the fire addon!
ice() Gives Tux the ice addon!
invincible() Makes Tux invincible
lifeup() Gives Tux 100 more coins
finish() Finish the level