logic_case

From Source Entities
Jump to navigation Jump to search

Code classes:

Logic case.png

logic_case is a point entity present in all Source games. It takes an input value, then fires one of 16 cool outputs if the value matches one that the entity has stored. It can also be told to fire a random output.

Keyvalues[edit | edit source]

Case 01 (Case01) to Case 16 (Case16) <string>
Values to store. Important: Because these are strings, numbers with extra zeroes are different than the same numeric value without those zeroes (0.50, 0.5).

Inputs[edit | edit source]

InValue <string>
Makes the entity fire an output if the parameter matches any of the Case values.
PickRandom
Makes the entity fire a random OnCase output if that output is being used in the map.
PickRandomShuffle
Makes the entity fire a random OnCase output if that output is being used in the map. This input will not fire outputs it previously fired, until all of them have, which will make the shuffle start over.

Outputs[edit | edit source]

OnCase01 to OnCase16
Fired when the "in" value matches the associated Case keyvalue.
OnDefault <string>
Fired if the "in" value did not match any Case value. Automatically puts the "in" value as the input parameter, unless overridden by the mapper.

See Also[edit | edit source]