Logic Gate Object

From Runic Games Wiki
Jump to: navigation, search

Contents

Logic Gate

Description

This Level Object is used to compare two inputs using the specified logic "Type" and fire different Output events depending on if the "Evaluate" Input event returned True or False.

Location

Right-click on an empty space in the Layout Scene Manager and choose Logic > Logic Gate from the list.

Properties

Name Type Description Read Only
INPUT
ONE
bool
Starting value of Input One.
TWO
bool
Starting value of Input Two.
LOGIC
TYPE
string
Logic operation to perform.
  • AND
    If "Input One" and "Input Two" are both True the "Evaluate" Input event will return True.
  • NAND
    If "Input One" and "Input Two" are both True the "Evaluate" Input event will return False.
  • NOR
    If "Input One" and "Input Two" are both False the "Evaluate" Input event will return True.
  • OR
    If either "Input One" and/or "Input Two" are True the "Evaluate" Input event will return True.
  • XOR
    If either "Input One" or "Input Two", but not both, are True the "Evaluate" Input event will return True.
NETWORK
SEND DATA
bool
If True the Logic Gate will send its state to multiplayer clients.
PROPERTIES
ALWAYS EVAL ON CHANGE
bool
If True the Logic Gate will fire an "Evaluate" Input event automatically even if the value of the input is identical to its previous value. If False it will not fire automatically if the value of the input doesn't actually change.
EVAL ON CHANGE
bool
If True the Logic Gate will fire an "Evaluate" Input event automatically when an input changes.

Input Events

Toggle Input One
Toggles the current value of Input One.
Toggle Input Two
Toggles the current value of Input Two.
Input One True
Set the value of Input One to True.
Input One False
Set the value of Input One to False.
Input Two True
Set the value of Input Two to True.
Input Two False
Set the value of Input Two to False.
Evaluate
Compare the current values of Input One and Input Two using the set logic "Type".

Output Events

Evaluated True
This event will fire when the Logic Gate receives an "Evaluate" Input event and it returns True.
Evaluated False
This event will fire when the Logic Gate receives an "Evaluate" Input event and it returns False.


Evaluate on Change

The properties "Eval on Change" and "Always Eval on Change" may have confusing names, but their usage is relatively simple.

"Eval on Change"

  • If this is set to True then any time Input One or Input Two receives an Input event the Logic Gate will automatically fire an "Evaluate" event.
  • If "Eval on Change" is set to False then no Output events will fire, even if Input One or Input Two receive Input events, until you explicitly fire an "Evaluate" event.


"Always Eval on Change" ( This basically acts as a modifier to the "Eval on Change" behavior, but only if "Eval on Change" is True ):

  • If this is set to True then any time Input One or Input Two receives an Input event the Logic Gate will automatically fire an "Evaluate" event no matter what.
  • If this is set to False then the Logic Gate will automatically fire an "Evaluate" event only if the value of Input One or Input Two actually changes. For example, if Input One is currently True and receives a "Input One False" event the Logic Gate will fire an "Evaluate" event because the value of Input One changed ( it went from True to False ). But if Input One is currently True and receives a "Input One True" event the Logic Gate will not fire an "Evaluate" event as the value of Input One never changed ( it went from True to True ).
Personal tools
Namespaces

Variants
Actions
Navigation
Runic Sites
Toolbox