Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I make RNG?
- Upauggfg12343nk
-
100+ posts
How do I make RNG?
so when I click the button, it will show roll a random item, they all have their own rarity: 1 in 2, 1 in 4, 1 in 100k, 1 in 1m, etc.
and I'm confused on how to script it, can someone help me?
and I'm confused on how to script it, can someone help me?
- Upauggfg12343nk
-
100+ posts
How do I make RNG?
pretty much, no. You only can roll 1 at a time and it all depends on ur luck and what you'll get. So like a poker machine roll type thing?
It's pretty much like sol's rng in roblox
Last edited by Upauggfg12343nk (March 23, 2024 05:27:58)
- MakeGamsse
-
4 posts
How do I make RNG?
you can do PICK RANDOM 1 to (however many) and if its = 1 then make it dopretty much, no. You only can roll 1 at a time and it all depends on ur luck and what you'll get. So like a poker machine roll type thing?
It's pretty much like sol's rng in roblox
but if its anything else then do pic krandom from however many for another roll e.g.
if its not that u can make more so yea
- Eason_9
-
1000+ posts
How do I make RNG?
You can do it with the pick random block:
Basically, the code picks a random number and it will detect if its equal to one, which creates a system to detect rarity of things. So, for example:
The code above will let the sprite go to the mouse pointer 1 in 10 times.
<(pick random (1) to (10)) = (1) > // This will return "true" 1 in 10 times.
<(pick random (1) to ((100) / (10))) = (1)> // This will return "true" 10% of the times.
Basically, the code picks a random number and it will detect if its equal to one, which creates a system to detect rarity of things. So, for example:
if <(pick random (1) to (10)) = (1) > then
go to [ mouse pointer v]
end
The code above will let the sprite go to the mouse pointer 1 in 10 times.
- BOBEXR
-
12 posts
How do I make RNG?
What about luck system? You can do it with the pick random block:<(pick random (1) to (10)) = (1) > // This will return "true" 1 in 10 times.
<(pick random (1) to ((100) / (10))) = (1)> // This will return "true" 10% of the times.
Basically, the code picks a random number and it will detect if its equal to one, which creates a system to detect rarity of things. So, for example:if <(pick random (1) to (10)) = (1) > then
go to [ mouse pointer v]
end
The code above will let the sprite go to the mouse pointer 1 in 10 times.
- Upauggfg12343nk
-
100+ posts
How do I make RNG?
Actually, I already found out how to make them. No need any help anymore.What about luck system? You can do it with the pick random block:<(pick random (1) to (10)) = (1) > // This will return "true" 1 in 10 times.
<(pick random (1) to ((100) / (10))) = (1)> // This will return "true" 10% of the times.
Basically, the code picks a random number and it will detect if its equal to one, which creates a system to detect rarity of things. So, for example:if <(pick random (1) to (10)) = (1) > then
go to [ mouse pointer v]
end
The code above will let the sprite go to the mouse pointer 1 in 10 times.
- Discussion Forums
- » Help with Scripts
-
» How do I make RNG?