Discuss Scratch

EliasAhmadi
Scratcher
0 posts

How do i make an RNG game?

I'm trying to make a game where you get a specific chance, for example, lets say i did it and i could get something that has a 1 out of 5 chance, or maybe 1 out of 300, i know it's hard to understand, but really just need help.
BigEmster
Scratcher
100+ posts

How do i make an RNG game?

To make something happen with a 1 in 5 chance:
if <(pick random (1) to (5)) = (1)> then
anything you put here has a 1 in 5 chance to run when the if check runs :: grey
end
for a 1 in 300:
if <(pick random (1) to (300)) = (1)> then
anything you put here has a 1 in 300 chance to run when the if check runs :: grey
end
Hopefully you can see the pattern.

Let me know if any of this doesn't make sense. Also, for future reference this post would be better suited to the Help With Scripts category.

Last edited by BigEmster (June 18, 2024 21:20:31)

Powered by DjangoBB