Chance
Runs on: Shared. Runs on the Community backend or inside a chatbox overlay.
Rolls a random number each time data arrives. If the roll lands within the configured percentage, the data goes down Pass, otherwise down Fail. The input data isn't inspected. Use it to give a fraction of events a surprise reaction.
Inputs
| Name | Type | Description |
|---|---|---|
input | any | Passed through unchanged on whichever output fires. |
Outputs
| Name | Type | Description |
|---|---|---|
pass | pass-through | The input, when the roll succeeds. |
fail | pass-through | The input, when the roll fails. |
Configuration
- Chance: A percentage from 0 to 100. At 75, Pass fires about three times out of four.
Example
After a Chat Command trigger for !loot, add a Chance node set to 20%. On Pass, award a rare item and send "You found a legendary sword!". On Fail, send "You got nothing but dust."