• Hey! Register here to create your account, engage with the community, and talk about what is new!

Can code fetch a random location?

algebrqic

New member
Joined
Mar 12, 2022
Messages
4
Reaction score
3
I'm working on a plot where I want to have random events happen in random locations. It's a completely flat basic plot and I want to add random spawns and possibly random loot crates or trees. I want these things to happen in random locations without having to manually grab the locations of individual blocks on the plot. How would I go about this?

Thanks.
 

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,260
Reaction score
356
in the set variable block, there is Set To Random Location (you can find it in the locations category), just put a variable that will be your location in the chest and the 2 corners you want your crates to appear it; i recommend that the variable is set to LOCAL to save resources and stuff, now when you want to summon something or set a block, just put the variable instead of the location argument!
 
Top Bottom