ProtoFlux:ForEachWithIndex
From Resonite Wiki
More actions
ForEachWithIndex
Flow
The ForEachWithIndex node takes in a List(Collection) and if the node should be done in reverse or not. When called, it will iterate through the list, providing the index and the element of that list.
It has an Async version too, see: AsyncForEachWithIndex.
Inputs
* (Call)
Calls an impulse to loop through a collection.
Collection (IList)
The collection to loop through.
Reverse (Bool)
Makes the loop go in reverse when iterating.
Outputs
LoopStart (Call)
Fires when the loop is about to start.
LoopIteration (Call)
Fires when the loop iterating through each element of the collection list.
LoopFailed (Continuation)
Fires when the loop failed.
LoopEnd (Continuation)
Fires when the loop has ended.
Index (Int)
The position of the collection currently being iterated through.
Element (Generic)
The element of the collection currently being iterated through.
Comments
- This node is called
ForEachWithIndexObjectwithin the engine. - Internally it runs a for() loop over the collection instead of using the ForEach function, explaining the handling of only Lists/Arrays and not dictionaries. See discussion for code.