How to create a custom blueprint node with a variable number of exec pins?

I’m learning how to create my own blueprint nodes through C++, and I know how to create a node that has multiple exec pins.
However I would like to make a node with a variable number of exec pins. Some defeult nodes have this feature (for exemple, the ‘sequence’ node) and you can hit the ‘add pin’ button and add as many exec pins as you’d like.
image

How do I do that?

2 Likes

Take a look at this and pls report back if it works: Creating a Node with Multiple Execute Pins : unrealengine (reddit.com)

3 Likes

That works, but it’s not what I’m asking. I know how to make a custom node with multiple exec pins.
What I want is to create a node that has the “add pin” button, which allows you to add as many exec pins you want to while in the blueprints. Like the “sequence” node:
image
image

1 Like

The only thing I found talking about the “Add pin” is the CommutativeAssociativeBinaryOperator in this page of the documentation, I’m following the thread because now I’m curious

2 Likes

It’s going to be through a custom slate widget for your node. The UK2Node_ExecutionSequence uses SGraphNodeK2Sequence.

A lot of the Unreal node connect the K2Node and the SGraphNode through a weird factory, but you can override CreateVisualWidget on any EdGraphNode to return a slate object that does extra bits (everything beyond the normal header & input/output pins).

3 Likes

I think this will help. https://www.gamedev.net/tutorials/programming/engines-and-middleware/improving-ue4-blueprint-usability-with-custom-nodes-r5694/