Difference between revisions of "If (LogiX node)"

From Neos Wiki
Jump to navigation Jump to search
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<languages></languages>
 
<languages></languages>
 
<translate>
 
<translate>
The '''If''' node fires impulses from one of two outputs dependent on the Condition when an impulse is received.
+
<!--T:1-->
 +
{{Infobox Logix Node
 +
| Name = If
 +
| Image =[[File: IfNodeNode.png | noframe | 128px | 'If' LogiX node ]]
 +
| Input0Type = Impulse | Input0Name = Run
 +
| Input1Type = Bool | Input1Name = Condition
 +
| Output0Type = Impulse | Output0Name = True
 +
| Output1Type = Impulse | Output1Name = False
 +
}}
  
<!--[[File:|border|256px|right]]-->
+
<!--T:2-->
 +
The '''If''' node fires an impulse from one of two outputs dependent on the <code>Condition</code> when an impulse is received at <code>Run</code>.
  
== Inputs & Outputs ==
+
== Usage == <!--T:3-->
{| class="wikitable"
+
Upon receiving an impulse at <code>Run</code>, an impulse is fired from </code>True</code> if </code>Condition</code> is True or from <code>False</code> if <code>Condition</code> is False. The default <code>Condition</code> value is <code>False</code>.
|+Inputs
 
|-
 
| Color
 
| Label
 
| Type
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| Run
 
| [[:LogiX:Impulses|Impulse]]
 
|-
 
| style="background-color:{{Boolean-color}}" |
 
| Condition
 
| [[:Category:Types:Bool|Boolean]]
 
|}
 
  
{| class="wikitable"
+
== Examples == <!--T:4-->
|+Outputs
 
|-
 
| Color
 
| Label
 
| Type
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| True
 
| [[:LogiX:Impulses|Impulse]]
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| False
 
| [[:LogiX:Impulses|Impulse]]
 
|}
 
  
== Usage ==
+
== Node Menu == <!--T:5-->
Upon receiving an impulse at Run, an impulse is fired from True if Condition is True or from False if Condition is False. The default Condition value is False.
 
 
 
== Examples ==
 
For similar if/else behavior which does not work via impulses consider the [[?: (LogiX node)|?: ternary operator]] node.
 
== Node Menu ==
 
 
</translate>
 
</translate>
  
[[Category:LogiX|If]]
+
[[Category:LogiX{{#translation:}}|If]]
[[Category:LogiX: Flow|If]]
+
[[Category:LogiX:Flow{{#translation:}}|If]]
 
{{:NodeMenu-Flow}}
 
{{:NodeMenu-Flow}}

Latest revision as of 14:26, 19 February 2022

Other languages:
English • ‎日本語 • ‎한국어
If
'If' LogiX node
Inputs
  Impulse Run
  Bool Condition
Outputs
  Impulse True
  Impulse False

The If node fires an impulse from one of two outputs dependent on the Condition when an impulse is received at Run.

Usage

Upon receiving an impulse at Run, an impulse is fired from True if Condition is True or from False if Condition is False. The default Condition value is False.

Examples

Node Menu

Flow
Back Events Boolean Latch Delay Delay With Value Dynamic Impulse Receiver Dynamic Impulse Receiver With Value`1
Dynamic Impulse Trigger Dynamic Impulse Trigger With Value`1 Fire On Change Fire On False Fire On True Fire While True For
If Impulse Demultiplexer Impulse Multiplexer Local Fire On Change`1 Local Fire On False Local Fire On True Local Impulse Timeout
Local Leaky Impulse Bucket One Per Frame Pulse Random Sequence Timer Update Updates Delay
Updates Delay With Value While