Skip to main content

Comparison

Intro

Perform simple comparison operations on values.

UI

First - Set a value to compare with Second.

Operation - Determine the comparison operation:

  • Less Than - Output true if First < Second.
  • Greater Than - Output true if First > Second.
  • Equal To - Output true if First = Second.
  • Not Equal To - Output true if First ≠ Second.
  • Less Than Or Equal To - Output true if First ≤ Second.
  • Greater Than Or Equal To - Output true if First ≥ Second.

Second - Set a value to compare with First.

Result - A read only preview of the output. Comparison will output a value of 1 when the result is true and a value of 0 when the result is false.

Example
  1. Create a Rectangle.
  2. Create a Comparison Utility.
  3. Set Second to 0.
  4. Create a Value Array.
  5. Add a second index to the Value Array and set it to 45.
  6. Connect rectangle.position.ycomparison.first.
  7. Connect comparison.idvalueArray.arrayIndex.
  8. Connect valueArray.idrectangle.rotation.

When the Rectangle's Y Position falls below 0, the Comparison returns true (1) which sets the Value Array's index to 1 which then sets the Rectangle's Rotation to 45.