Break / Continue in For Each Loop

I am trying to ignore a step in a loop based on a condition, something a “Continue” usually would solve. I can only find the “Break” command which exits the entire loop.

Does “Continue” or something similar exist, or how do you solve a scenario like this usually ?

Check out the info on Break and Keep pins in here:
https://thegraybook.vvvv.org/reference/language/loops.html

I think you need to use an If region inside the Loop to skip certain parts for this iteration.

Thank you for the reference. I was reading it but it seems “keep” only works on the splicer, but not on the accumulator.

I am trying to accumlate relevant force vectors and then apply them at the end of the loop to a particle.

Is the following how I could do it ?
Build a spread of all the vectors troughout the loop, including all vectors.
Check as I go if I want a vector be included or excluded building a spread of true/falses. Once the loop exits, toss out the irrelevant vectors using that true/false pattern before adding them up for the force Vector?

Else maybe the suggestion of greg works, where I use a if region and then depending on I add the vector or add a 0/0 vector to the accumulator. That sounds simpler lol.

1 Like