m Yosh moved page ProtoFlux:ASync For to ProtoFlux:Async For: ASync -> Async |
clean |
||
(One intermediate revision by the same user not shown) | |||
Line 17: | Line 17: | ||
|}} | |}} | ||
The '''Async For''' node is the | The '''Async For''' node is used to perform looping operations by allowing one to fire impulses a set amount of times. It is the [[async]] variant of the [[ProtoFlux:For|For]] node. | ||
== Inputs == | == Inputs == | ||
Line 27: | Line 27: | ||
=== Count ([[Type:Int|int]]) === | === Count ([[Type:Int|int]]) === | ||
The amount of times to trigger <code>LoopIteration</code>. Will not trigger any iterations if less than 1. | |||
=== Reverse ([[Type:Bool|bool]]) === | === Reverse ([[Type:Bool|bool]]) === | ||
Line 41: | Line 41: | ||
=== LoopIteration ([[Impulses#ASync|AsyncCall]]) === | === LoopIteration ([[Impulses#ASync|AsyncCall]]) === | ||
Fires for each iteration of the loop. This impulse is triggered < | Fires for each iteration of the loop. This impulse is triggered <code>Count</code> amount of times and the next iteration will only be fired once the current iteration's [[context]] is finished. | ||
=== LoopEnd ([[Impulses|Continuation]]) === | === LoopEnd ([[Impulses|Continuation]]) === |
Latest revision as of 21:51, 13 December 2024
The Async For node is used to perform looping operations by allowing one to fire impulses a set amount of times. It is the async variant of the For node.
Inputs
* (IAsyncOperation)
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 (AsyncCall)
Fires after *
is pulsed and before any iterations are done. Will be pulsed even if Count < 1
.
LoopIteration (AsyncCall)
Fires for each iteration of the loop. This impulse is triggered 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
.