Logic multicompare: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
(added explanation)
Line 5: Line 5:
[[Image:{{PAGENAME}}.png|right]]
[[Image:{{PAGENAME}}.png|right]]
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]].{{clr}}
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]].{{clr}}
==Explaination==
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==

Revision as of 12:16, 12 December 2009

Template:Wrongtitle Template:Base point

Entity Description

Logic multicompare.png

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.

Explaination

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 or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

  • IntegerValue
<integer> Initial integer value.
  • ShouldComparetoValue
<boolean> If set, compare inputs against IntegerValue.

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)