I’m sorry that this is such a simple question. I’ve been watching videos on conversion the past few days but something just isn’t clicking.
All the ufunctions have been created in the header, so I’m just trying to figure out the format of the CPP, I know it’s all wrong. I’m trying to get the info from my Blueprint Interface, but:
Sorry again, it’s my first blueprint conversion, I’ve got my header game down, but this is still a mystery.
I can understand other peoples code and find similar use cases but just need a little push. Thanks for taking a look and sorry again it’s such a noob question.
What I mean by this is that if you don’t know C++ you should take a course first before starting with Unreal…
It is not a good idea to start a house from the roof.
otherwise all this for you will be the same as Mandarin Chinese.
Well, thank you. I understand Blueprints pretty thoroughly. So the concept of C++ makes broader sense, like I know the words in Mandarin, but not the most literal punctuation, I’m just having trouble taking that first step to “connect some nodes” in C++
I very well might be wrong but from what I understand, what you provided is how to create the functions individually.
But how do I define Initialize by combining those other functions.
I assume just ordering them is like connecting the nodes?
(Assuming all the functions have been defined)
Would “Initialized” look like:
Trust me, take a little C++ course. There are many videos on YouTube. In a month you will have a general idea of how all this works.
If you know blueprints everything will be much easier for you.
But believe me you still have a lot to learn.
But don’t worry because it’s very easy.
Unfortunately it is not something that is learned in 5 minutes.
I’ve been learning for 20 years and I still don’t know a lot of things.
But with a mini C++ course with the basics you have enough to get started.
First of all you are not supposed to call things that only exist in Blueprint from c++.
If your goal is just to make your own Blueprint functions in c++ and try to call them in c++ that is a good starting point but it quickly becomes complicated when you don’t even know the basics of c++.
You need to provide more context if you need actual help writing the blueprint in c++ but you obviously won’t learn c++ just seeing the solution.
// Where Execute_MyFunction means MyFunction will be called on the interface's actor
if (MyClass->ImplementsInterface(UMyInterface::StaticClass())) {
IMyInterface::Execute_MyFunction(ActorThatImplementsSaidInterface,passedParameterToInterfaceFunction);
}
}
Thank you so much Raven, I was not understanding that the ActorThatImplementSaidInterface could not be left as just a text of the tags and was wondering why it wasn’t connecting! TY!<3
Yes because the interface is called in a sort of reverse order it’s left side is the interface and so it needs to know who is the interface being called on.
Depending on the called function you need to pass in the same parameter types as the predicted function.
Delegate binding functions work in a similar way (but you do not need to pass in variables but the matched function has to have them)
Thanks again Raven, you got me a long ways. Here’s the code that built fully for me.
After a bit of research it appears “Execute_” might have been depreciated.
Thank you all for the hints!