Instructions/Compare Number: Difference between revisions

From Desynced Wiki
(informational)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:


Used for typical mathematical evaluation if the number in the top Value is Equal, Larger or Smaller than the number in the bottom value that it is being Compared against.
Used for typical mathematical evaluation if the number in the top Value is Equal, Larger or Smaller than the number in the bottom value that it is being Compared against.
Cannot be used to compare coordinates. To check if coordinates are equal, use [[Instructions/Distance|Distance]] and compare the number. For further comparision on coordinates do [[Behavioral_Location_Math|math]].


Compare is 0 by default.
Compare is 0 by default.
Line 12: Line 14:
Can be read as:
Can be read as:


If Value(1) is greater than Compare(0)
* If Value(1) is greater than Compare(0)


1 is greater than 0, so it would route through the pin labelled "If Larger".
* 1 is greater than 0, so it would route through the pin labelled "If Larger".


==== Similar Instructions ====
==== Similar Instructions ====

Latest revision as of 18:47, 10 October 2023


Compare Number
     
     Divert program depending on number of Value and Compare
Lua ID check_number
Category Math
Icon Compare Values.png
Argument One: Type Exec
Argument One: Name If Larger
Argument One: Description Where to continue if Value is larger than Compare
Argument Two: Type Exec
Argument Two: Name If Smaller
Argument Two: Description Where to continue if Value is smaller than Compare
Argument Three: Type Input
Argument Three: Name Value
Argument Three: Description The value to check with
Argument Three: Data Type num
Argument Four: Type Input
Argument Four: Name Compare
Argument Four: Description The number to check against
Argument Four: Data Type num



Description[edit | edit source]

This is the "Greater than, Equal or Less Than" instruction. Strictly for evaluating numbers.

Uses[edit | edit source]

Used for typical mathematical evaluation if the number in the top Value is Equal, Larger or Smaller than the number in the bottom value that it is being Compared against.

Cannot be used to compare coordinates. To check if coordinates are equal, use Distance and compare the number. For further comparision on coordinates do math.

Compare is 0 by default.

Can be read as:

  • If Value(1) is greater than Compare(0)
  • 1 is greater than 0, so it would route through the pin labelled "If Larger".

Similar Instructions[edit | edit source]

Compare Entity, Compare Item