logic_compare

From Source Entities
Jump to navigation Jump to search

Code classes:

Logic compare.png

logic_compare is a point entity present in all Source games. It compares two numbers to each other and fires outputs depending on their values.

Keyvalues[edit | edit source]

Initial value (InitialValue) <float>
Value #1.
Compare value (CompareValue) <float>
Value #2.

Inputs[edit | edit source]

SetValue <float>
Sets Initial value.
SetCompareValue <float>
Sets Compare value.
SetValueCompare <float>
Sets Initial value, then compares it to Compare value and fires outputs.
Compare
Compares the values and fires outputs.

Outputs[edit | edit source]

OnEqualTo <float>
Fires if the values are equal. Automatically puts Initial value as the input parameter, unless overridden by the mapper.
OnNotEqualTo <float>
Fires if the values are not equal. Automatically puts Initial value as the input parameter, unless overridden by the mapper.
OnGreaterThan <float>
Fires if Initial value is greater than Compare value. Automatically puts Initial value as the input parameter, unless overridden by the mapper.
OnLessThan <float>
Fires if Initial value is less than Compare value. Automatically puts Initial value as the input parameter, unless overridden by the mapper.

See Also[edit | edit source]