Random Number
VariablesVariable.Random
Put a random number from min to max (both included for whole numbers) into a number variable.
With 1 to 6, 6 can come up too.
Into a synced variable, the result reaches everyone: dice and lotteries everyone should agree on are built this way (Dice).
For a Number variable, both the minimum and the maximum can come up. For whole numbers, Unity's Random.Range leaves out the maximum, so Tripwire adds 1 to it when calling. If both are typed in and the minimum is larger, it's an error.
Official docs: Random.Range (Unity)
Settings
| Name | Type | Default |
|---|---|---|
| Variable | Variable | |
| Min | Number | |
| Max | Number |
On a card
WhenInteract⋯
What to do
Random Number⋯
Variable(pick)
Min
Max
+ Add what to do