Weighted Random Pick
PureWeightedRandomPickPicks a random item from an array using weighted probabilities.
Type: Pure (no side effects)
Category: Fortuna|Array & Collection
Keywords: array & collection
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| Items | TArray<int> | — | Items parameter |
| Weights | TArray<float> | — | Weights parameter |
Outputs
| Name | Type | Description |
|---|---|---|
| ReturnValue | int | ReturnValue output |
| SelectedIndex | int | SelectedIndex output |
Example Use Cases
Example 1
Loot drop table with rare/common weights.
Example 2
Enemy spawn selection biased toward certain types.