Bzysio
October 31, 2023, 2:13pm
1
for example, i want an enemy to drop something that has a 1/5 chance how do i do that
2 Likes
_580k
October 31, 2023, 4:09pm
2
It’s actually possible to make a chance to drop, You can change the first random number to between 1 and 5, and second random number is replaced with a “1” digit.
I’ve recently seen an implementation of random item/unit drops that was
too complex
difficult to understand actual odds
annoying to change values in
The script checks for a new random number every time and uses a chain of if statements, which looks like this:
[image]
This logic is flawed because all other odds are only applied after the previous chance fails:
[image]
If you want to create correct odds, I recommend using type groups. They provide a much clearer overview of success odds. H…
You can also refer to the topic
4 Likes