Hi!
I am creating a maze spawning system using structure blocks and /clone command, but i cant get the coordinates of my loop blocks the right way.
I want them like this: "15 4 12",but i get them like "15,4 12,5 14,5"
here's my code:
command /generate:
trigger:
if player is a op:
if {g::%player%} = "true":
send "&cGeneraattori pois" to player
set {g::%player%} to "false"
else:
send "&aGeneraattori päällä" to player
set {g::%player%} to "true"
on load:
set {g::%all players%} to "false"
on click on glowstone:
if {g::%player%} is "true":
set {cbl} to event-block's location
loop all blocks in radius 9 of location of {cbl}:
if "%loop-block's type%" = "glowstone block":
set {r} to a random integer between 1 and 13
set {rplace} to 39+{r}
set {_x} to loop-block's x-coord
set {_y} to loop-block's y-coord
set {_z} to loop-block's z-coord
send "%{_x}% %{_y}% %{_z}%" to all players
make console execute command "clone 0 0 %{rplace}% 0 0 %{rplace}% %{_x}% %{_y}% %{_z}%"

I am creating a maze spawning system using structure blocks and /clone command, but i cant get the coordinates of my loop blocks the right way.
I want them like this: "15 4 12",but i get them like "15,4 12,5 14,5"
here's my code:
command /generate:
trigger:
if player is a op:
if {g::%player%} = "true":
send "&cGeneraattori pois" to player
set {g::%player%} to "false"
else:
send "&aGeneraattori päällä" to player
set {g::%player%} to "true"
on load:
set {g::%all players%} to "false"
on click on glowstone:
if {g::%player%} is "true":
set {cbl} to event-block's location
loop all blocks in radius 9 of location of {cbl}:
if "%loop-block's type%" = "glowstone block":
set {r} to a random integer between 1 and 13
set {rplace} to 39+{r}
set {_x} to loop-block's x-coord
set {_y} to loop-block's y-coord
set {_z} to loop-block's z-coord
send "%{_x}% %{_y}% %{_z}%" to all players
make console execute command "clone 0 0 %{rplace}% 0 0 %{rplace}% %{_x}% %{_y}% %{_z}%"