Logic compare
From Valve Developer Community
This point-based entity is available in all Source games.
| Table of contents |
[edit]
Entity Description
Compares an input value to another value, and fires an output depending on if the input value is equal to, greater than, less than, or not equal to, the compare value, sending the input value as data.Note the difference between the SetValueCompare and SetCompareValue inputs.
[edit]
Keyvalues
- targetname <target_source>
- Defines the name that other entities refer to this entity by.
- hammerid [Episode Two Update]
- <integer readonly> This id is used for debugging purposes in Hammer.
- InitialValue
- <integer> Initial value for the input value.
- CompareValue
- <integer> The value to compare against.
[edit]
Inputs
- Kill
- Removes this entity from the world.
- Removes this entity and all its children from the world.
- AddOutput <string>
- Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
- Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
- 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.
[edit]
Outputs
- Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
- !activator = activator
- OnEqualTo <float>
- Fired when the input value is equal to 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.
- OnLessThan <float>
- Fired when the input value is less than 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.

