ProtoFlux:For

From Resonite Wiki
Revision as of 21:53, 12 December 2024 by Yosh (talk | contribs) (make more concise, matching async for)
For
*
LoopStart
Count
LoopIteration
Reverse
LoopEnd
iteration
Flow

The For node is used to perform looping operations by allowing one to fire impulses a set amount of times.

For the async variant of this node, see Async For.

Inputs

* (Call)

Begin the for loop.

Count (Int)

The amount of times to trigger LoopIteration. Will not trigger any iterations if less than 1.

Reverse (Bool)

If True, the Iteration output will start at Count - 1 and go down towards 0.

Outputs

LoopStart (Call)

Fires after * is pulsed and before any iterations are done. Will be pulsed even if Count < 1.

LoopIteration (Call)

Fires for each iteration of the loop. This impulse is triggered <count>Count amount of times and the next iteration will only be fired once the current iteration's context is finished.

LoopEnd (Continuation)

Fires after the final LoopIteration completes execution.

Iteration (Int)

For each LoopIteration, this output is set to be the index of the iteration for said iteration's context. By default, this will start at 0 and increment until Count - 1 unless Reverse is True.

Examples