nwge-docs

Console

The engine console is used to run commands to interact with the game and/or engine. It is accessible in any nwge game with the F2 key.

Usage

Console commands are often used to inspect or change engine state and are often used for debugging in games. The engine generally does not print anything to the console, using the journal instead.

Whenever you run a command, it is saved to a command history. You can press the Up and Down arrow keys to navigate through it.

Syntax

To execute a command, simply input its name with space-separated arguments. For example:

r.textures d

Will execute the r.textures command with 1 argument: d.

You may also wrap an argument in quotation marks (") to include spaces in the argument. For example:

e.bind "key binding with spaces" tab

Will execute e.bind with 2 arguments: key binding with spaces, tab.

API

The following functions can be used by your game to interact with the engine console. They are defined in the <nwge/console.hpp> header and are defined in the nwge::console namespace.

Commands

Below is a list of console commands pertaining to the console itself:

See Also