This class is giving you access to the game dev console. You can register new console commands, write messages…


GetDevConsole

GetDevConsole

Description: Return object handle of the dev console system.

DevConsole@ GetDevConsole()

[return] Object handle of the dev console.

Example:

// Get a handle of the dev console and display the dev console on screen
DevConsole@ _hConsole = GetDevConsole();
 
if (_hConsole !is null)
{			
    _hConsole.Open();
}

Open

Open

Description: Open the dev console and display it on screen.

void Open()

Example:

DevConsole@ _hConsole = GetDevConsole();
 
if (_hConsole !is null)
{			
    _hConsole.Open();
}

Close

Close

Description: Close the dev console.

void Close()

Example:

DevConsole@ _hConsole = GetDevConsole();
 
if (_hConsole !is null)
{			
    _hConsole.Close();
}

IsOpened

IsOpened

Description: Return true if the dev console is currently opened.

bool IsOpened()

[return] true/false.

Example:

DevConsole@ _hConsole = GetDevConsole();
 
if (_hConsole !is null)
{			
 
    if (_hConsole.IsOpened())
    {
        Print("The console is currently opened");
    }
 
}

AddMessage

AddMessage

Description: Add a message in the console with the specified color.

void AddMessage(String fMessage, Color fColor)

[in] fMessage: The message string.
[in] fColor: The message color.

Example:

DevConsole@ _hConsole = GetDevConsole();
 
if (_hConsole !is null)
{			
    hConsole.Open();
    hConsole.AddMessage("this is a green message", Color(0.0f, 1.0f, 0.0f, 1.0f));
}

Clear

Clear

Description: Clear every messages in the console.

void Clear()

Example:

DevConsole@ _hConsole = GetDevConsole();
 
if (_hConsole !is null)
{			
    _hConsole.Clear();
}
  • modding/scripting/api/devconsole.txt
  • Last modified: 14/10/2018 12:17
  • (external edit)