Moderator elections are being held. See Valve Developer Community:Moderator elections for more details.
Users who would like to run for moderator must be autoconfirmed and have at least 100 edits. Users can check their own edit count at Special:Preferences.
Users who would like to run for moderator must be autoconfirmed and have at least 100 edits. Users can check their own edit count at Special:Preferences.
logic_case
logic_case | |
---|---|
![]() | |
Type | Point entity |
Engine | ![]() |
Availability | In all games |
logic_case
is a point entity available in all Source games. It 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
). Use logic_random_outputs for a weighted random output.
![]() |
---|
CLogicCase defined in ![]() logicentities.cpp
|
![Icon-Important.png](/w/images/thumb/5/5c/Icon-Important.png/10px-Icon-Important.png)
![Tip.png](/w/images/thumb/4/45/Tip.png/9px-Tip.png)
Keyvalues
- Case 01
(Case01)
to Case 16(Case16)
<string> - The values to test against.
Targetname:
- Name
(targetname)
<string> - The targetname that other entities refer to this entity by.
Inputs
InValue
<string>- Compares the Input value to the case values, and fires the appropriate output, if any.
PickRandom
- Fires 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 cases have been picked, at which point the shuffle starts over.
Outputs
OnCase01
toOnCase16
- Fired when the input value equals the corresponding Case value.
OnDefault
- Fired when the input value does not equal any of the Case values.