Logic compare: Difference between revisions
Jump to navigation
Jump to search
m (Robot: fixing template case.) |
TomEdwards (talk | contribs) (cleanup) |
||
Line 1: | Line 1: | ||
{{ | [[File:{{PAGENAME}}.png|left|alt=|link=]] | ||
{{base point|logic_compare}} It examines the relationship between two numbers ("value" and "compare value"), and fires appropriate [[#Outputs|output]](s). | |||
The equation is (''value'' - ''compare value''). | |||
==Keyvalues== | ==Keyvalues== | ||
; <code>InitialValue <[[int]]></code> | |||
: Initial value to compare. | |||
; <code>CompareValue <int></code> | |||
: | : The value to compare against. | ||
{{KV Targetname}} | |||
: | |||
==Inputs== | ==Inputs== | ||
; <code>SetValue <[[float]]></code> | |||
: Set the value that will be compared. | |||
; <code>SetValueCompare <float></code> | |||
: Set the value that will be compared | : Set the value to compare, then perform a comparison. | ||
; <code>SetCompareValue <float></code> | |||
: Set the value to compare against | |||
: Set the value | ; <code>Compare</code> | ||
: Perform a comparison. | |||
{{I Targetname}} | |||
: Set the compare | |||
: | |||
==Outputs== | ==Outputs== | ||
; <code>OnEqualTo <[[float]]></code> | |||
; <code>OnNotEqualTo <float></code> | |||
; <code>OnGreaterThan <float></code> | |||
; <code>OnLessThan <float></code> | |||
: The appropriate output(s) are fired when the <code>Compare</code> or <code>SetValueCompare</code> input is received. Each pass the input value. | |||
{{O Targetname}} | |||
: | |||
Revision as of 07:44, 7 January 2010

Template:Base point It examines the relationship between two numbers ("value" and "compare value"), and fires appropriate output(s).
The equation is (value - compare value).
Keyvalues
InitialValue <int>
- Initial value to compare.
CompareValue <int>
- The value to compare against.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Inputs
SetValue <float>
- Set the value that will be compared.
SetValueCompare <float>
- Set the value to compare, then perform a comparison.
SetCompareValue <float>
- Set the value to compare against
Compare
- Perform a comparison.
Outputs
OnEqualTo <float>
OnNotEqualTo <float>
OnGreaterThan <float>
OnLessThan <float>
- The appropriate output(s) are fired when the
Compare
orSetValueCompare
input is received. Each pass the input value.