Logic case: Difference between revisions
Jump to navigation
Jump to search
Tip:Use with logic_timer for extremely random events.
m (Robot: fixing template case.) |
TomEdwards (talk | contribs) (cleanup) |
||
Line 1: | Line 1: | ||
[[File:logic_case.png|left]] | |||
{{base point|logic_case}} It either compares an input to up to 16 configured values, firing a corresponding output if there is a match (on <code>InValue</code>), or fires a random output (on <code>PickRandom</code>). | |||
{{bug|This entity will not recognize [[float]]s with trailing zeroes (like <code>0.50</code> or <code>1.00</code>). Always remove any.}} | |||
{{tip|Use with [[logic_timer]] for extremely random events.}} | |||
{{ | |||
== Keyvalues == | == Keyvalues == | ||
; Case01 <span style="font-weight:normal;">to</span> Case16 <code><[[string]]></code> | |||
: <string> | : The values to test against. | ||
{{KV Targetname}} | |||
== Inputs == | == Inputs == | ||
; <code>InValue <[[string]]></code> | |||
: Fire a random OnCase output with at least one connection. | : Compare an input value to the case values, firing the appropriate output on the first match. | ||
; <code>PickRandom</code> | |||
: Fire a random <code>OnCase</code> output with at least one connection. | |||
: Fires a random OnCase output with at least one connection, with no repeats until all | ; <code>PickRandomShuffle</code> | ||
: Fires a random <code>OnCase</code> output with at least one connection, with no repeats until all have been picked. | |||
{{I Targetname}} | |||
== Outputs == | == Outputs == | ||
; <code>OnCase01</code> <span style="font-weight:normal;">to</span> <code>OnCase16</code> | |||
: Fired when the input value does not equal any of the Case values. {{ | : Fired when the input value equals the corresponding Case value. | ||
; <code>OnDefault <[[string]]></code> | |||
: Fired when the input value does not equal any of the Case values. Passes the value on. | |||
{{O Targetname}} |
Revision as of 01:53, 1 August 2009
Template:Base point It either compares an input to up to 16 configured values, firing a corresponding output if there is a match (on InValue
), or fires a random output (on PickRandom
).

Keyvalues
- Case01 to Case16
<string>
- The values to test against.
- 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
InValue <string>
- Compare an input value to the case values, firing the appropriate output on the first match.
PickRandom
- Fire a random
OnCase
output with at least one connection. PickRandomShuffle
- Fires a random
OnCase
output with at least one connection, with no repeats until all have been picked.
Outputs
OnCase01
toOnCase16
- Fired when the input value equals the corresponding Case value.
OnDefault <string>
- Fired when the input value does not equal any of the Case values. Passes the value on.