
Game Console 0.3.2 Tools 4.3 Community
Submitted by user Xanatos; MIT; 2025-04-16
Addon to add a console to your game, this will allow you to run commands after opening the console.
To add a command simply use
Console.register_custom_command("reload", _reload, [], "Reload current scene")
where reload is a function without parameters.
If you want to parse parameter use
Console.register_custom_command("count_up", _count_up, ["(int) amount to count up"], "Increase the counter", "Command will increase a local counter", ["count_up 1", "count_up 3"])
This adds a command with a single argument, a short and long description and some examples.
To unregister it run, this should be done if a node does leave the scene tree.
Console.remove_command("reload")
Other interessting methods
Console.set_console_key(KEY_F12) -> Set toggle key
Console.hide_console() -> Hide console
Console.show_console() -> Show console
Console.should_pause_on_open() -> Pause game tree if console does open up
Console.disable() -> Disable console completely, can be used to remove it on release builds
Console.enable() -> Enable a disabled console
View files Download Submit an issue Recent Edits