Switch
Take a different path for each value.
logic.switch compares one value with a list of cases and leaves by the one it equals: one node instead of a chain of comparisons.
Settings
| Setting | What it does |
|---|---|
| Value | What to look at, such as {option.tier}. |
| Cases | One per line. Each gets its own way out. |
Ways out
- One per case, labelled with the case.
Anything else, when the value equals none of them.
Notes
- Text ignores capitals and spaces at either end; numbers compare as numbers, so
5matches5.0. - The first case that matches wins.
- In the blueprint each case leads out by
case:and the case in lowercase, with dashes for anything else: "Gold tier" iscase:gold-tier.
Example
A /role command with a text option colour and cases red, green and blue, each wired to its own Add role.