Download

Custom nodes with multiple exec pins

Hi,
I started looking into expanding my knowledge in C++ and so far I just can’t wrap my head around the “returnType” of a custom node function.

What I am trying to understand is how to create a node that looks like the Branch node. I’ve tried to use Enums as the return type, but failed. (ExpandEnumAsExecs)

So how what would be the most simple way to replace the output bool with an execution pin?
I would really appreciate if anyone could point out what I am doing wrong.

.h


UCLASS()
class NODES_API UMyNode : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:
	UFUNCTION(BlueprintCallable, Category = CustomNodes)
		static bool MyFunction(bool test);
};

.cpp


bool UMyNode::MyFunction(bool test)
{
	return true;
};

branch.jpg

this is what I tried to do, but the “void UMyNode::MyFunction” gives me squiggle lines.
1671afa689e348c8c303e3c2ae07e31d92194ec0.jpeg

ok, so far I’ve managed to create more enum input pins.


still not what I intended.

I found a solution myself. Sorry for this newbie post, but my rubber duck was just staring me.

82fa7a26014ad9d4be9371c19c592e2224658f19.jpeg