Logic compare: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 11: Line 11:


* {{kv targetname}}
* {{kv targetname}}
* '''Initial value''' ''InitialValue <integer>''
 
: Initial value for the input value.
* '''InitialValue'''
* '''Compare value''' ''CompareValue <integer>''
: <integer> Initial value for the input value.
: The value to compare against.
 
* '''CompareValue'''
: <integer> The value to compare against.


==Inputs==
==Inputs==

Revision as of 20:37, 11 July 2005

Template:Wrongtitle

Entity Description

Entity Name: logic_compare

Compares an input value to another value. If the input value is less than the compare value, the OnLessThan output is fired with the input value. If the input value is equal to the compare value, the OnEqualTo output is fired with the input value. If the input value is greater than the compare value, the OnGreaterThan output is fired with the input value.

  • Note: the difference between the SetValueCompare and SetCompareValue inputs.

Keyvalues

  • InitialValue
<integer> Initial value for the input value.
  • CompareValue
<integer> The value to compare against.

Inputs

  • SetValue <float>
Set the value that will be compared against the compare value.
  • SetValueCompare <float>
Set the value that will be compared against the compare value and performs the comparison.
  • SetCompareValue <float>
Set the compare value.
  • Compare
Force a compare of the input value with the compare value.


Outputs

  • OnLessThan <float>
Fired when the input value is less than the compare value. Sends the input value as data.
  • OnEqualTo <float>
Fired when the input value is equal to the compare value. Sends the input value as data.
  • OnNotEqualTo <float>
Fired when the input value is different from the compare value. Sends the input value as data.
  • OnGreaterThan <float>
Fired when the input value is greater than the compare value. Sends the input value as data.