Logic multicompare: Difference between revisions
Jump to navigation
Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
No edit summary |
||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{CD|CLogicCompareInteger|file1=logicentities.cpp}} | |||
{{this is a|point entity|name=logic_multicompare|sprite=1}} | {{this is a|point entity|name=logic_multicompare|sprite=1}} | ||
Compares a set of inputs to each other. If they are all the same, fires an | Compares a set of inputs to each other. If they are all the same, fires an <code>OnEqual</code>. If any are different, fires the <code>OnNotEqual</code>. | ||
This entity has an internal list of integers that it has received from any inputValue input's. Any values sent to this entity, must be sent as an integer or boolean because "if it can't be converted" the entity will "just throw it away" (Source Code comment from dev's). Currently, there is no way to clear this 'list', so the entity is not reusable. | This entity has an internal list of integers that it has received from any inputValue input's. Any values sent to this entity, must be sent as an integer or boolean because "if it can't be converted" the entity will "just throw it away" (Source Code comment from dev's). Currently, there is no way to clear this 'list', so the entity is not reusable. | ||
== Keyvalues == | == Keyvalues == | ||
{{KV Targetname}} | |||
{{KV|Integer Value (optional)|intn=IntegerValue|integer|Initial integer value.}} | {{KV|Integer Value (optional)|intn=IntegerValue|integer|Initial integer value.}} | ||
{{KV|Should use Integer Value|intn=ShouldComparetoValue|boolean|If set, compare inputs against Integer Value.}} | {{KV|Should use Integer Value|intn=ShouldComparetoValue|boolean|If set, compare inputs against Integer Value.}} | ||
== Inputs == | == Inputs == | ||
{{ | {{I|InputValue|Input value|param=integer}} | ||
{{ | {{I|CompareValues|Compares the values and fires appropriate outputs}} | ||
== Outputs == | == Outputs == | ||
{{ | {{O|OnEqual|Fires if the values are equal {{activator|activator}}}} | ||
{{ | {{O|OnNotEqual|Fires if the values are not equal {{activator|activator}}}} | ||
== See Also == | |||
* {{ent|logic_compare}} | |||
[[Category:IO System]] | [[Category:IO System]] |
Revision as of 05:20, 7 October 2024
![]() |
---|
CLogicCompareInteger |
![]() |

logic_multicompare
is a point entity available in all Source games.
Compares a set of inputs to each other. If they are all the same, fires an OnEqual
. If any are different, fires the OnNotEqual
.
This entity has an internal list of integers that it has received from any inputValue input's. Any values sent to this entity, must be sent as an integer or boolean because "if it can't be converted" the entity will "just throw it away" (Source Code comment from dev's). Currently, there is no way to clear this 'list', so the entity is not reusable.
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
- Integer Value (optional) (IntegerValue) <integer>
- Initial integer value.
- Should use Integer Value (ShouldComparetoValue) <boolean>
- If set, compare inputs against Integer Value.
Inputs
- InputValue <integer >
- Input value
- CompareValues
- Compares the values and fires appropriate outputs
Outputs
- OnEqual
- Fires if the values are equal (!activator is the activator)
- OnNotEqual
- Fires if the values are not equal (!activator is the activator)