Custom Blueprint containing custom C++ code

Hello, my name is Hunter Simms. I am very new to UE4 and coding in general, but I decided to start working on a game idea and have been spending hours in tutorials and forums… which have been very helpful, I already feel like I’m getting a basic grasp of something that has a lot of developing power.

I have ran into an issue, however. I have trying to create a blueprint that once executed will launch an external program. My understanding was that there isn’t a blueprint built into UE4 that would do this for me, so I had to make my own. This has led me to different web tutorials talking about how to go about this but I feel like I am missing something because I either get compiling errors or (If I sort those out) the script I made in C++ never shows up when I search for it in the list of blueprints, where as the tutorials are saying it should.

I am extremely new to this whole world of programming/developing so I figured I was just getting it wrong because I was so new to this whole process, and I’m sure I am now. That being said, I have spent hours trying to get this sorted out and exhausting most every Youtube/Google search that could help me and am still lost. I will post the links I saw and where I specifically where I got lost or ran across an error.

Do I simply copy and paste the code into a .cpp file and .h file and save, hit compile in the main game, and then it will show up whenever I go to the blueprint graph and right click to select any given blueprint? I have tried this and it never shows up when I search for it.

  1. I do not understand what it means when it talks about adding a custom editor module at all.
  2. I am also unfamiliar with a runtime module.

I apologize if I’m overlooking something very obvious. I promise that I held off posting in the forums until I became completely stumped because I didn’t want to ask a question that seemingly has so many resources discussing it. My problem is that it seems like the resources assume I have certain knowledge already that I simply don’t have, I’m not blaming the tutorials… it’s probably very basic knowledge, but nonetheless it is knowledge I don’t have.

Seriously, any help at all would be appreciated and thank you very much for taking time out to help if you do.

You can skip all the stuff about why you need to ask a question, just ask. Here on the forum is the place for a discussion and the AnswerHub is the place to ask a very specific question. It’s better to ask one question in one thread instead of putting a list together, of course providing the steps that you have attempted.

You may just need to generate the Visual Studio files. After adding your new .cpp and .h files, right click the project in Explorer and generate them. That provides the glue, the generated.h file that the Editor needs to put the gameplay code together.

Gotcha, just didn’t want people to rip on me for seemingly not using the search function. I will try what you suggested here when I get the chance, thank you! I’ll edit to see if it worked.