#Random System

1 messages · Page 1 of 1 (latest)

mystic moth
#

I'm tryna make a type of Murder Mystery Game And I know how to make a random pleyer select and everything but the only problem I'm having is I want it so something happens when the Detective interigates, and I want it to be a 0.05 or 1/20 Chance To Happen. How would I go about doing this?

(No I'm not taking the suggestion "UsE a RaNdOm InT oR fLoAt" because that's not an actual rarity. While yes that's kinda what a ririty system is doing that's less spot on.)

kind breach
#

Why won’t you use a int/float?

#

is there a reason?

#

rarity’s are based of numbers…

#

With what your asking int/float randomizer is perfect for this

brittle adder
#

hell you could do it with Random Int too if you wanted

Pick a number between 0 and 100000, for 20% chance, check if its lower than 20000

mystic moth
brittle adder
#

Do you want to execute the Random Float and have a 1/20 chance of succeeding, 19/20 chance of failing?

mystic moth
#

This does work, yes but I feel like its not an actual rarity.

#

Kinda yes. But if this works the same way I'm willing to give it am attempt.

brittle adder
#

If you want to work in fractions instead of percentages (eg. 1/20 instead of 5%), pick a random int between 1 and 20 and check if it equals 1