node that is equivalent to c++ etc continue

hi

is there a node that is the equivalent of the c++ etc continue to jump / break to the next iteration in a loop

thanks

No need for a node in BPs. This prints 0,1,3,4

1 Like

have had places where it was not that easy to skip to the next iteration by means of the way you are showing and a continue node would have come in handy

one example would be using sequences to structure your code better

if you are mid way and the rest of the sequence no longer needs to execute you must place branches everywhere in order to be able to terminate the sequence mid way

Perhaps you were looking for a combo of:


For a custom solution / specific case, you’d cobble together your own macro from the mundane nodes.

2 Likes

lol

i have come across gates before when searching for nodes but are not quite sure what they do as it is not self evident
i never saw their use so never really looked them up

but seems you are saying this is the way to go

will have to look into them then

I think unfortunately in Blueprint the closest you’ll get is just using branches to stop logic at a certain point in the iteration. This is a little messier, especially if you’re using things like a sequence and want to stop somewhere in the first branch of the sequence.

2 Likes

Two lines of code can quickly escalate to a screenful of spaghetti wires, true. The Switch on Int with the Default pin can come handy in a pinch.

It’s quite static, though.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.