Logic case: Difference between revisions
Jump to navigation
Jump to search
Note:This entity with not recognize float values ending in
ChiliBopas (talk | contribs) No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{wrongtitle|title=logic_case}} | {{wrongtitle|title=logic_case}} | ||
Revision as of 13:55, 24 October 2007
Entity description
Compares an input to up to 16 preset values. If the input value is the same as any of the preset values, an output corresponding to that value is fired.
For example: If Case01 is set to 2
and Case02 is set to 5
, and the input value is 5
, the OnCase02 output will be fired.
This entity can also be used to select from a number of random targets via the PickRandom input. One of the OnCase outputs that is connected to another entity will be picked at random and fired.

0
(like 0.50
or 1.00
). Simply remove these.- The ideal entity for randomized events.
- Use with logic_timer for extremely random events.
Keyvalues
- Case(01-16)
- <string>
Inputs
- InValue <string>
- Compare the Input value to the case values, and fire the appropriate output, if any.
- PickRandom
- Fire a random OnCase output with at least one connection.
- 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
- OnCase(01-16)
- Fired when the input value equals the Case(01-16) value. (!activator is the activator)
- OnDefault
- Fired when the input value does not equal any of the Case values. (!activator is the activator)