Skip to content

Unit Reference Gate

RealityStop edited this page Mar 29, 2018 · 1 revision

Gate

Bolt - Decrement Variable

The Gate node is a convenience node that assists in filtering control flow input. The Gate maintains an internal state tracking whether the node is open or closed and allows Control Flow inputs on the "enter" port only if the node is in the "open" state. roughly equivalent to the numerical '--' operator in C++ or C#. The Decrement Variable node can replicate both pre-decrement (--X) and post-decrement (X--) forms. It is only valid on numerical variables (int or float)

The unit operates like a union of the Get and Set Variable nodes Bolt already offers. Of particular note, the unit takes a control flow input. This is for convenience, allowing the user to specify when the decrement should take place and to maintain the convention that variables should only change when the user indicates they should.

The output ports are somewhat different.

Input Ports

  • Enter : The only control flow that can transition through the node, and it will only do so if the node has been toggled to the open state.
  • Open : Opens the node on input. Does not trigger an Exit flow.
  • Close : Closes the node on input. Does not trigger an Exit flow.
  • Toggle : Toggles the node state on input. Does not trigger an Exit flow.
  • Initially Open : Determines what the initial state of the unit should be, before any of the state inputs updates the state.

Output Ports

  • Exit : Only triggers on an Enter control flow when the unit is opened.
Clone this wiki locally