- check_circle Functions
Published Jan 21st, 2021, 1/21/21 12:13 pm
- 1,683 views, 3 today
- 84 downloads, 0 today
5
I haven't used tropical fish randomizers, since those are really not random enough. I used them for a server, but I kept getting the same numbers! So I now sat down, and figured out a solution.
I take two armor stands, and I pick a random one of them. Then I detect which one it picked, and I'll add that to a variable. Then i randomize, but this time I multiply it by 2, and then add to the variable. Then 4, then 8, 16, 32, and so on and so on.
Then I take the "%=" of it, which basically divides it by a number you pick, until it cant anymore, and then it spits out what's left. (it also plusses it with one, since it will pick from 0-9, if you pick the number 10)This means, that you, yourself set the number (RNGint), and it'll pick a random number between 1 and the number you picked!
Tutorial for dummies:
Change the score "RNGint" to the range of numbers you want (ex. 10);
/scoreboard players set @e[tag=01RNG,tag=1] RNGint (Number range)
And to extract the number, you need to call the same entity (@e[tag=01RNG,tag=1])
/scoreboard objectives setdisplay sidebar RNG
Note: it updates the random number every tick
I take two armor stands, and I pick a random one of them. Then I detect which one it picked, and I'll add that to a variable. Then i randomize, but this time I multiply it by 2, and then add to the variable. Then 4, then 8, 16, 32, and so on and so on.
Then I take the "%=" of it, which basically divides it by a number you pick, until it cant anymore, and then it spits out what's left. (it also plusses it with one, since it will pick from 0-9, if you pick the number 10)This means, that you, yourself set the number (RNGint), and it'll pick a random number between 1 and the number you picked!
Tutorial for dummies:
Change the score "RNGint" to the range of numbers you want (ex. 10);
/scoreboard players set @e[tag=01RNG,tag=1] RNGint (Number range)
And to extract the number, you need to call the same entity (@e[tag=01RNG,tag=1])
/scoreboard objectives setdisplay sidebar RNG
Note: it updates the random number every tick
Compatibility | Minecraft 1.13 |
to | Minecraft 1.17 |
Tags |
tools/tracking
4928901
119
totally-random-rng-1-to-2-32
Create an account or sign in to comment.