Discuss Scratch

OzoKing
Scratcher
20 posts

RNG Coding Help

Hey! I need help coding a random number generator. I do get random numbers, but I need help with percentages. The numbers are completely random. How do I make percentages?
(please ignore my old signature…)

Last edited by OzoKing (Feb. 11, 2025 18:09:57)

96498cb
Scratcher
100+ posts

RNG Coding Help

Can you help me with what you mean, do you mean like an if else, like this
ifpickrandom1to2=2thenifpickrandom1to2=2then. . .else. . .else. . .
or like adding a % symbol, like this
joinnumber%
GameCatastrophe0927
Scratcher
1000+ posts

RNG Coding Help

Just do
pickrandom1to100/100

Or…

setvarto1foreversetvartovar*5+1mod99
OzoKing
Scratcher
20 posts

RNG Coding Help

GameCatastrophe0927 wrote:

Just do
pickrandom1to100/100

Or…

setvarto1foreversetvartovar*5+1mod99
Oh thank you!
OzoKing
Scratcher
20 posts

RNG Coding Help

96498cb wrote:

Can you help me with what you mean, do you mean like an if else, like this
ifpickrandom1to2=2thenifpickrandom1to2=2then. . .else. . .else. . .
or like adding a % symbol, like this
joinnumber%
I realize how confusing I put it- You've helped though, sorry!

Powered by DjangoBB