Calling BP function When c++ event gets called
I have a blueprint called BP_PawnComputer. Also i have a C++ class called ACECommunication. Also BP_PawnComputer has an instance of this ACECommunication class.
What i want is, whenever BestMoveReceived event inside ACECommunication called, calling a function inside BP_PawnComputer. However while ACECommunication is a pure c++ class, BP_PawnComputer is a pure blueprint class.
For that reason i can't see any solution except carrying some of the functionalities of both classes to c++ or BP. I would like to know if there are other ways i can achieve this, or am i stuck with restructring things here and there?
Thanks in advance.
BP_PawnComputer is not pure blueprint class, all blueprints are basing (are parented from) on classes in C++ and you can get blueprint class in form of highest base class in C++, so if BP_PawnComputer is Pawn, you can get it APawn and access functions and variables in that is in APawn. You can also make base class in C++ for your blueprints with events which you can call from C++ (make a function with BlueprintImplementableEvent), thats why i always recomand to create base classes in C++ and the objects based from it in blueprints or continue using C++.
Accessing blueprint classes in C++ are same as you access other objects in blueprints, with different function and varables
answered Sep 12 '15 at 01:27 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here