ProtoFlux:Sequence: Difference between revisions

From Resonite Wiki
Create Sequence ProtoFlux Node Page
 
make consistent with async
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
|Outputs=
|Outputs=
[
[
{"Name":"Calls", "Multi": 20, "Type":"Call"}
{"Name":"Calls", "Multi": 3, "Type":"Call"}
]
]
|}}
|}}


The '''Sequence''' node performs each of the provided impulses in order, waiting for the [[synchronous context]] of each impulse to finish before executing the next one.


Sequence is a ProtoFlux node that does a bunch of ProtoFlux lines in order, waiting for each to finish excluding any [[Impulses#ASync|Async]] tasks created. This is useful in running a bunch of code segments that may not trigger their output pulses due to their execution failing. For example, a [[ProtoFlux:Set Parent|Set Parent]] Node can fail to set a slot's parent due to null arguments, so it's output won't fire. This node can avoid this kind of issue.
This can be useful for organizational purposes or to avoid code duplication if something needs to be performed after a bunch of branching paths.


== Inputs ==
== Inputs ==
Line 19: Line 20:
=== * ([[Impulses|Call]]) ===
=== * ([[Impulses|Call]]) ===


Start the execution of all the Calls (List of [[Impulses|Call]]) in order.
Start execution of the node.


== Ouputs ==
== Outputs ==


=== Calls (List of [[Impulses|Call]]) ===
=== Calls (List of [[Impulses|Call]]) ===


The list of [[Impulses|Calls]] to fire in order after * ([[Impulses|Call]]) is impulsed.
The list of impulses to fire in order. The impulses are run in a synchronous context, and after the context of the impulse finishes, the next impulse is fired.


== Examples ==
== Examples ==


<gallery widths=480px heights=480px>
== See Also ==
File:Protoflux_example_Sequence.webp|Using Sequence to try to trigger a bunch of [[ProtoFlux:Set Parent|Set Parent]] Nodes, some have null arguments.
 
</gallery>
* [[ProtoFlux:Async Sequence]] for the asynchronous anlogue


[[Category:ProtoFlux:Flow]]
[[Category:ProtoFlux:Flow]]

Latest revision as of 15:20, 13 December 2024

Sequence
*
Calls
+
-
Flow

The Sequence node performs each of the provided impulses in order, waiting for the synchronous context of each impulse to finish before executing the next one.

This can be useful for organizational purposes or to avoid code duplication if something needs to be performed after a bunch of branching paths.

Inputs

* (Call)

Start execution of the node.

Outputs

Calls (List of Call)

The list of impulses to fire in order. The impulses are run in a synchronous context, and after the context of the impulse finishes, the next impulse is fired.

Examples

See Also