Download

Is there a way to override the For Loop node or write a custom For Loop?

I’m mildly annoyed with the For Loop node in blueprints. I noticed that the For Loop node is the equivalent of for(int32 FirstIndex; FirstIndex <= LastIndex; FistIndex++){}. I’m not a fan of the use of <= this is loop. Is there any way I can override it or make my own custom loop function in blueprints? I also noticed I can’t iterate in reverse using i-- nor does there appear to be more complex iterators like for(int32 i, j; <some codition>; i++, j--).

Loop is a macro, double click it and have a look inside. Rather than modifying it, copy the nodes and paste them into your own macro + modifications.

Also: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Types/MacroLibrary/

May I ask why ?

create a blueprint function library… very handy for this sort of stuff