#A way to run functions with random chances
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
It's not for 1.20.1 my datapack is for 1.20
Generate a random number in a datapack using the /random command, or alternatively, a loot table.
It's a number generator how to run functions
<@&1166082198152159386> <@&1202694677766348840>
Please note that you still might not immediately get a response since all helpers are human beings and volunteers (and also might be sleeping right now)
You didn't even give me time to start typing a response
Hehehe
Please have more than 30 seconds of patience
Sry
I'm just checking how does it works
You can use execute if score to run different functions based on the value of the score
??? Can you give me the command
The syntax is execute if score <scoreboard> <objective> matches <number> run ...
But that was just generate a random number that doesn't give us a score right?
The guide I linked above shows you how to store the random value into score
The above command is how you can use the random number to determine what function to run
Ok let me check
Ooh it works on 1.20.2+ ok
read the third message again.
its a 1.20 feature
That's what we are discussing already :p