ProtoFlux:Impulse Demultiplexer: Difference between revisions

From Resonite Wiki
forgot category
m Fix link to multiplex node
 
(4 intermediate revisions by one other user not shown)
Line 4: Line 4:
|Inputs=
|Inputs=
[
[
{"Name":"Operations", "Type":"Impulse", "Multi":5}
{"Name":"Operations", "Type":"Call", "Multi":5}
]
]
|Outputs=
|Outputs=
Line 13: Line 13:
|}}
|}}


An Impulse Demultiplexer is useful for condensing down multiple lines of execution code into one line. For example, let's say that you have 10 buttons, and you want to change a text to 10 different strings, positions, and colors using those 10 buttons. Using an Impulse Demultiplexer you can put each button into Operations (List of Impulses) on the impulse demultiplexer, then use the index in 3 different [[ProtoFlux:Multiplexer|Multiplexers]]. Writing the multiplexer's output to the properties of the text object now allows you to reduce what would take up to 70 nodes and 60 connections down to 43 nodes and 43 connections. And also it makes it a lot less complex and easier to read.
An Impulse Demultiplexer is useful for condensing down multiple lines of execution code into one line. For example, let's say that you have 10 buttons, and you want to change a text to 10 different strings, positions, and colors using those 10 buttons. Using an Impulse Demultiplexer you can put each button into Operations (List of Impulses) on the impulse demultiplexer, then use the index in 3 different [[ProtoFlux:Multiplex|Multiplexers]]. Writing the multiplexer's output to the properties of the text object now allows you to reduce what would take up to 70 nodes and 60 connections down to 43 nodes and 43 connections. And also it makes it a lot less complex and easier to read.
 
This node could commonly be called a switch, switchboard, router, or an impulse array.
 


== Inputs ==
== Inputs ==


=== Operations (List of Impulses) ===
=== Operations (List of [[Impulses]]) ===


List of impulses to take impulses from.
List of impulses to take impulses from.
Line 23: Line 26:
== Outputs ==
== Outputs ==


=== OnTriggered (Continuation) ===
=== OnTriggered ([[Impulses|Continuation]]) ===


Sends an impulse when any one of Operations (List of Impulses) is called.
Sends an impulse when any one of Operations (List of [[Impulses]]) is called.


=== Index ([[Type:Int|Int]]) ===
=== Index ([[Type:Int|Int]]) ===


The position of the Impulse on the list of Operations (List of Impulses) that was called starting at 0 for the first one.
The position of the Impulse on the list of Operations (List of [[Impulses]]) that was called starting at 0 for the first one.


Only exists during OnTriggered (Continuation)
Only exists during OnTriggered ([[Impulses|Continuation]])


== Examples ==
== Examples ==
<i> This desperately needs examples, since this has a wide range of applications </i>
<gallery widths=480px heights=480px>
 
File:Protoflux_example_impulse_demultiplexer.webp|Impulse demultiplexer being used to control the flow of an impulse chain using an [[ProtoFlux:Index Of First Match|Index Of First Match]] node.
{{Stub}}
</gallery>


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

Latest revision as of 11:41, 27 February 2024

Impulse Demultiplexer
Operations
OnTriggered
Index
+
-
Flow

An Impulse Demultiplexer is useful for condensing down multiple lines of execution code into one line. For example, let's say that you have 10 buttons, and you want to change a text to 10 different strings, positions, and colors using those 10 buttons. Using an Impulse Demultiplexer you can put each button into Operations (List of Impulses) on the impulse demultiplexer, then use the index in 3 different Multiplexers. Writing the multiplexer's output to the properties of the text object now allows you to reduce what would take up to 70 nodes and 60 connections down to 43 nodes and 43 connections. And also it makes it a lot less complex and easier to read.

This node could commonly be called a switch, switchboard, router, or an impulse array.


Inputs

Operations (List of Impulses)

List of impulses to take impulses from.

Outputs

OnTriggered (Continuation)

Sends an impulse when any one of Operations (List of Impulses) is called.

Index (Int)

The position of the Impulse on the list of Operations (List of Impulses) that was called starting at 0 for the first one.

Only exists during OnTriggered (Continuation)

Examples