Logic multicompare: Difference between revisions
Jump to navigation
Jump to search
(Undo revision 367112 by Thunder4ik (talk)) Tag: Undo |
Thunder4ik (talk | contribs) m (→top: clean up, added underlinked tag) |
||
Line 1: | Line 1: | ||
{{Underlinked|date=January 2024}} | |||
<!-- When this page is updated to {{langsp}} or {{language subpage}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang}}{{CD|CLogicCompareInteger|file1=logicentities.cpp}} | <!-- When this page is updated to {{langsp}} or {{language subpage}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang}}{{CD|CLogicCompareInteger|file1=logicentities.cpp}} | ||
{{this is a|e0|name=logic_multicompare|sprite=1}} | {{this is a|e0|name=logic_multicompare|sprite=1}} | ||
Compares a set of inputs to each other. If they are all the same, fires an [[#Outputs|OnEqual output]]. If any are different, fires the [[#Outputs|OnNotEqual output]]. | Compares a set of inputs to each other. If they are all the same, fires an [[#Outputs|OnEqual output]]. If any are different, fires the [[#Outputs|OnNotEqual output]]. |
Revision as of 00:49, 6 January 2024

This article needs more
links to other articles to help
integrate it into the encyclopedia. Please help improve this article by adding links
that are relevant to the context within the existing text.
January 2024



January 2024
![]() |
---|
CLogicCompareInteger |
![]() |

logic_multicompare
is an e0 available in all Source games.
Compares a set of inputs to each other. If they are all the same, fires an OnEqual output. If any are different, fires the OnNotEqual output.
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
- Integer Value (optional) (IntegerValue) <integer>
- Initial integer value.
- Should use Integer Value (ShouldComparetoValue) <boolean>
- If set, compare inputs against Integer Value.
- 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
- InputValue <integer >
- Input value
- CompareValues
- Compares the values and fires appropriate outputs
Outputs
{{IO|OnEqual|Fires if the values are equal (!activator is the activator) {{IO|OnNotEqual|Fires if the values are not equal (!activator is the activator)