Logic compare: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) (cleanup) |
(Cleanup) |
||
Line 1: | Line 1: | ||
{{base point|logic_compare}} | |||
== Entity description == | |||
[[File:logic_compare.png|left|link=]] | |||
It examines the relationship between two numbers ("value" and "compare value"), and fires appropriate [[#Outputs|output]](s). | |||
The equation is (''value'' - ''compare value''). | The equation is (''value'' - ''compare value''). | ||
{{clr}} | |||
==Keyvalues== | == Keyvalues == | ||
{{KV|Initial value|integer|Initial value for the input value.}} | |||
{{KV|Compare value|integer|The value to compare against.}} | |||
{{KV Targetname}} | {{KV Targetname}} | ||
==Inputs== | == Inputs == | ||
{{IO|SetValue|Set the value that will be compared against the compare value.|param=float}} | |||
{{IO|SetValueCompare|Set the value that will be compared against the compare value and performs the comparison.|param=float}} | |||
{{IO|SetCompareValue|Set the compare value.|param=float}} | |||
{{IO|Compare|Force a compare of the input value with the compare value.}} | |||
{{I Targetname}} | {{I Targetname}} | ||
==Outputs== | == Outputs == | ||
{{IO|OnLessThan|Fired when the input value is less than the compare value. Sends the input value as data.|param=float}} | |||
{{IO|OnEqualTo|Fired when the input value is equal to the compare value. Sends the input value as data.|param=float}} | |||
{{IO|OnNotEqualTo|Fired when the input value is different from the compare value. Sends the input value as data.|param=float}} | |||
{{IO|OnGreaterThan|Fired when the input value is greater than the compare value. Sends the input value as data.|param=float}} | |||
{{O Targetname}} | {{O Targetname}} |
Revision as of 23:18, 8 June 2011
Entity description

It examines the relationship between two numbers ("value" and "compare value"), and fires appropriate output(s).
The equation is (value - compare value).
Keyvalues
- 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 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.