Download

how to do key tasks

hi I want to get started on using unreal 4 but I don’t know enough about it, I know there are a lot of tutorials out there but they are mostly about how to use the editor and blueprints. I want to learn how to do stuff in C++.

Stuff i’m particularly interested in;
-collision detection - I found a tutorial online but the guy used the script to create a box and that box would detect collision, I want to be able to have collision detection on an existing piece of mesh in scene.
-detect when an object is inside another object
-when collision is detected, return name of script
-controller input
-start animation and detect when animation is finished
-Spawn objects,
-access variables from other cpp files

Welcome Maxis!

Do you already know some C++? One good way to learn the kind of stuff you are trying to do is to look at Epic’s templates. You can create exact same game template in a Blueprint and a C++ version. Then you can compare the too and try to understand how the C++ version works. In the FPS template for instance in the Projectile class you’ll see how to implement collision or overlap detection. In the Character class, you’ll see how to bind and implement controls, and how to spawn objects (projectiles).

And of course there is the API documentation. First, when you don’t know what to search for, it might be a bit overwhelming, but that’s why I suggest to start by trying to understand the C++ game template projects.

thanks I’ll look into the templates, btw I herd that you can view the c++ code thats inside the blueprints (so if I make an enable input node I could some how see how to do it in C++ and use the programming in a custom script), if that is the case how do I do that?

I don’t think you can do that directly. What you can do is to look up the implementation of Blueprint, if you have the Engine source. I’m not sure what the best way is to find the correct function. What I’m usually doing, is hovering over the node to see the tooltip and then searching the Engine source for that text. This will be usually some comment right above the function that implements the blueprint node.

I also submitted a feature request, to add a “Go to implementation” option in the Blueprint editor: [Request] "Go to implementation" option for BP nodes. - UE4 AnswerHub

However, some things are implemented differently by Blueprint nodes, then how you would do it in C++. Responding to user input is one of these things. That’s why I recommend checking out the C++ templates.