Bind new console commands?

I’m trying to stick to blueprints for now just to get over my own bias against visual scripting stuff.

However, I’d like to add some console commands just to get the hang of the engine and help myself later in development. Is there any way to bind a console command to a function in a blueprint? I haven’t found anything myself, and I’d not be surprised if there was nothing available right now for that.

If not blueprint-ready, how deep do I have to dig in C++ to add new ones? Use a macro next to a function? Subclass something? Find the built in console commands buried deep in the engine? I found a command to dump all the console commands, and I’ve been looking through, but still haven’t found how to make new ones yet.

There is a node under the “Development” section in the library called “Execute Console Command” that allows you to specify the command, and the player that should receive the command, will allow you to execute a command after an event is called. Is what you were looking for, or do you mean create a new command?

Edit: Ok I think I misread, sorry I am unaware of how to bind new commands…

Yep, I’ve used that one before.

I’m looking to create new commands. I’d prefer blueprints but if C++ is the only way I’m open to that as well.

Looks to me like C++ is going to be the way to go, from the link below you can see how the commands get created, and I assume you would be able to add yours in a similar fashion, by calling the functions within the ConsoleManager.cpp" file. I found link while looking for a way to do as I was curious about how it would be done.

Note that link requires you to be logged into your Github account, as well as have a current activated subscription, otherwise you will get a 404 not found message:

https://github.com/EpicGames/UnrealEngine/blob/35d8b371a10392565bfc68ddb6f9b52aa3ba4bbf/Engine/Source/Runtime/Core/Private/HAL/ConsoleManager.cpp#L1297

Not a definite answer, but might point you in the right direction. Hope that is more useful. :slight_smile:

EDIT: Here is another one of interest:

Thanks, that looks like exactly what I’m after. Plus it gave me an excuse to actually get the Github linking set up. :slight_smile: (I might also use as an excuse to learn how to make new blueprint nodes.)

Should be plenty to get me started, I’ll post again if I run into a wall.

EDIT: Oh really? The shooter game has its own implementation as well that I can look at? That sounds like a good place to start, add some commands to that project, then replicate the system from somewhere else.