Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I make RNG?
- MakeGamsse
- Scratcher
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
- Scratcher
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.
*This is my signature, more info on it here! Scroll down by highlighting anywhere and press shift and the down arrow key.
Get your images up to the forums with my shop: Imagif Hosters (for free!)
If you have some time to spare, perhaps go read my Scratch Wiki essays!
And since I'm here I should probably advertise my projects but I can't find a good project I made.
11 (almost 12) - He/Him
If you have some time to spare, perhaps go read my Scratch Wiki essays!
And since I'm here I should probably advertise my projects but I can't find a good project I made.
11 (almost 12) - He/Him
- BOBEXR
- Scratcher
7 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
- Scratcher
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?