ProtoFlux:Conditional: Difference between revisions

From Resonite Wiki
Added Basic description and inputs
Fixed descriptions. Added suggestion. Added See Also section.
Line 15: Line 15:
|}}
|}}


The <code>Conditional</code> node changes its output depending on the input <code>Condition</code>.
The '''Conditional''' node changes its output depending on the input <code>Condition</code>.
 
{{Note|If you want something similar to this but with [[Impulses|impulses]], use the [[ProtoFlux:If|If]] node instead.|suggestion}}


== Inputs ==
== Inputs ==


=== OnTrue ===  
=== OnTrue (Pseudo-Generic) ===  


The value to output when the Condition is true.
The value to output when the Condition is true.


=== OnFalse ===  
=== OnFalse (Pseudo-Generic) ===  


The value to output when the Condition is false.
The value to output when the Condition is false.
Line 33: Line 35:
== Outputs ==
== Outputs ==


=== * ===
=== * (Pseudo-Generic) ===


Returns the result.
Returns the result.


== See Also ==
* Wikipedia's definition of the [https://en.wikipedia.org/wiki/Ternary_conditional_operator ternary conditional operator].
* Microsoft's documentation on the [https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/conditional-operator conditional (ternary)] operator.


[[Category:ProtoFlux:Operators]]
[[Category:ProtoFlux:Operators]]

Revision as of 10:10, 27 June 2024

?:
OnTrue
*
OnFalse
Condition
Operators

The Conditional node changes its output depending on the input Condition.

If you want something similar to this but with impulses, use the If node instead.

Inputs

OnTrue (Pseudo-Generic)

The value to output when the Condition is true.

OnFalse (Pseudo-Generic)

The value to output when the Condition is false.

Condition (Bool)

A boolean to decide which input value to output.

Outputs

* (Pseudo-Generic)

Returns the result.

See Also