C++ output params setup for a forloop node

Hello, I have started to develop my own Blueprint Function library in C++ and I was wondering how should I setup a custom ForLoop node to have the same output nodes than the default one (attached pic). I was also wondering what is the process to call the exec pins like “LoopBody” inside my for loop.
I couldn’t find either the ForLoop node in the engine source. I guess because it is really a macro.
If there is some tutorial about this specific tasks I would appreciate a link.

Thanks :wink:

https://wiki.unrealengine.com/Bluepr…lueprint_Nodes

Right at the very bottom in the advanced section should be everything you need. iirc exec pins are just delegates.

Hi,
I see I can find many nodes in source but others like “sequence” seems impossible.
Do you know if Is there any way to access its source in C++?

The for loop node is actually a blueprint macro, not C++. If you double click it you will see the source BP. The sequence node is not a UFUNCTION, I think, it’s probably an K2_Node directly, like the IF node.

Yes, I noticed that about the ForLoop and how expensive it is in BP. I don’t understand why there’s not a native function implementation so I tried to do on my own, but I can’t find a guide on how to create all the needed pins.

ExpandEnumAsExecs:

https://forums.unrealengine.com/development-discussion/c-gameplay-programming/82648-custom-nodes-with-multiple-exec-pins