This article's documentation is for anything that uses the Source engine. Click here for more information.

logic_multicompare

From Valve Developer Community
Jump to: navigation, search
English (en)
... Icon-Important.png
class hierarchy
CLogicCompareInteger defined in logicentities.cpp
CLogicalEntity
CServerOnlyEntity
CBaseEntity
Logic multicompare.png

 logic_multicompare is a point entity available in all Source 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.

Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.

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)