Announcement

Collapse
No announcement yet.

Bind new console commands?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    Originally posted by Veovis Muad'dib View Post
    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, this will allow you to execute a command after an event is called. Is this 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...
    Last edited by DotCam; 08-10-2014, 03:10 PM.
    Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

    Comment


      #3
      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.

      Comment


        #4
        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 this link while looking for a way to do this as I was curious about how it would be done.

        Note that this 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/UnrealE...ager.cpp#L1297

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

        EDIT: Here is another one of interest:

        https://answers.unrealengine.com/que...e-command.html
        Last edited by DotCam; 08-10-2014, 03:42 PM.
        Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

        Comment


          #5
          Thanks, that looks like exactly what I'm after. Plus it gave me an excuse to actually get the Github linking set up. (I might also use this 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.
          Last edited by Veovis Muad'dib; 08-10-2014, 04:45 PM.

          Comment

          Working...
          X