Instructions/Compare Number

From Desynced Wiki
Revision as of 05:34, 17 September 2023 by Johan (talk | contribs) (informational)


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

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

Uses

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.

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

Compare Entity, Compare Item