How would have a C++ class exposed to blueprint, that has multiply execes outputs?
Can’t seem to find anything on google
Just did that, but is there a reason why the enum “Looping” dont output everytime a loop goes through?
It only outputs when the loop is done
Okay thanks,
Since im quit new to c++, i find it a bit hard to find the soultion for my problem.
Is there any chance that you might setup a simple class that does what im trying to archive?
Also, perhaps many other new users that get’s into c++ might find this helpful
The whole concept of the function, is just to learn and test a few things.
Im currently on the topic of simple adding more outputs execs for a c++ class that is exposed to a blueprint
Reason for that, is i dont wanna use c++ for everything, other than heavy mechanics sutch as loops, calculation etc etc.
Since, the goal is to expose this c++ class to BP, i would have “Exces” one for Looping and one for when the loop is done.
I have already made these functions above, but the problem is that i dont really know how to expose them to an “Exces” for a blueprint?
Sorry i should prob have been more clear in the content.
basically asking, how would i go about making c++ class that can output from different exces
For simpler way, you can use BlueprintImplementableEvent.
MyActor.h
class AMyActor : public AActor
{
GENERATED_BODY()
UFUNCTION(BlueprintImplementableEvent)
void LoopFunction();
UFUNCTION(BlueprintImplementableEvent)
void LoopFinished();
void MyFunction();
}
MyActor.cpp
AMyActor::MyFunction()
{
for (int a = 0; a < 5; a++)
{
LoopFunction();
}
LoopFinished();
}
“LoopFunction” and “LoopFinished” can be created as event on blueprint.
If you want them on output nodes, you might need a custom K2_Node, but it is lack of documentation. Last time, I tried to create one, but I couldn’t figure it out.
Oh okay that makes sense now, mhh are there no work around this?
maybe Useing it with a BlueprintFunctionLibrary can do it, like Nachomonkey said ,using the Enum As output and using Swith to specific the output ,during the BlueprintFunctionLibrary ,add a timer call it while the fuction triggered ,and give it a loop ,add more out put as a blueprint macro, using this macro in your blueprint class,it may work, i haven’t try it ,but it is possible