I found another excellent demonstration video and up to-date too on how to build mazes very fast. This video here by far has done an excellent job on establishing the workings of a basic command loop function and even expanded the its use with the help of the positioned that took me some time to understand and some other things, but once I started to work it all out the more it made sense to me to go about building up my commands that way.
So with that here are the first set of working commands. Give it a test and see how it works with the "BL Base level" portion of the pyramid because it will not work anywhere else. Below are the first group of commands which is the setup commands.
#setup command function
scoreboard objectives add path dummy
execute at @e[name=Drone] run summon armor_stand ~ ~ ~ {CustomName:"{\"text\":\"builder\"}",NoGravity:1,Invulnerable:1,}
execute at @e[name=Drone] run function build:path
This next set of commands is what will build the pathways in the pyramid.in this post it will only build in the +x direction, and in theory the final command should repeat the build:path process over and over and pass this command function to detect each red stone block until it reached the last red stone block to finally halts its build process.
#build path function
scoreboard players set @e[type=armor_stand,name=builder] path 1
execute if block ~12 ~1 ~ minecraft:redstone_block run scoreboard players set @e[type=armor_stand,name=builder,scores={path=0},limit=1] path 1
#Select path direction (if available)
scoreboard players set #builder path 0
scoreboard players operation #builder path = @e[type=armor_stand,name=builder,scores={path=1..4},sort=builder,limit=1] path
#remove redstone block when a direction is chosen
execute if score #builder path matches 1..4 run setblock ~ ~1 ~ air
#create path
execute if score #builder path matches 1 run fill ~2 ~1 ~-1 ~6 ~3 ~1 air
execute if score #builder path matches 1 positioned ~12 ~ ~ run function build:path
Ok, I expected this to happen. I've already came up with a way on how to debug the function to find where the problem is. Just replace the command function group above with the Debug Function below and this time it should work. Also the red stone block looks perfect and so does both the armor stands. The red stone block is supposed to be at head/eye level with both the armor stands. Also use this command below if your going to start the function manually ,
/execute at @e[name=Drone] run function build:path
Now if this Debug Function below removes the red stone blocks in a straight line then that's a good sign that means the relative coordinates are correct and the execute positioned function is working just fine. Here's the game plane hopefully with this execute positioned command function it will replace the need for the armor stand to move around to each location to build. Now the "Drone" armor stand should never move and is where the commands are going to be centered around. If this function below doesn't works, my suspicions is that execute positioned relative coordinates are not allowing the execute if block command coming back true thus canceling the next build task or the set block relative coordinates are not correct so I change the air block to a gold block for visual purposes. Now that should do
Debug Function
#build path Debug Function
execute if block ~12 ~1 ~ minecraft:redstone_block run setblock ~ ~1 ~ gold_block
execute positioned ~12 ~ ~ run function build:path
Ok, I expected this to happen. I've already came up with a way on how to debug the function to find where the problem is. Just replace the command function group above with the Debug Function below and this time it should work. Also the red stone block looks perfect and so does both the armor stands. The red stone block is supposed to be at head/eye level with both the armor stands. Also use this command below if your going to start the function manually ,
/execute at @e[name=Drone] run function build:path
Now if this Debug Function below removes the red stone blocks in a straight line then that's a good sign that means the relative coordinates are correct and the execute positioned function is working just fine. Here's the game plane hopefully with this execute positioned command function it will replace the need for the armor stand to move around to each location to build. Now the "Drone" armor stand should never move and is where the commands are going to be centered around. If this function below doesn't works, my suspicions is that execute positioned relative coordinates are not allowing the execute if block command coming back true thus canceling the next build task or the set block relative coordinates are not correct so I change the air block to a gold block for visual purposes. Now that should do
Debug Function
#build path Debug Function
execute if block ~12 ~1 ~ minecraft:redstone_block run setblock ~ ~1 ~ gold_block
execute positioned ~12 ~ ~ run function build:path
Very interesting, judging by your screenshot the function appears to have built the gold block in the same place three times, which is interesting because it proves the execute positioned command is working as intended because if it didn't the function would be stuck in a perpetual loop. Also it appears the execute if block command was still executing on the armor stand. Ok this should do the trick, try out this new command out. This time the function should build three gold blocks in a row leaving the last block as a red stone.
#build path Debug Function
execute positioned ~ ~ ~ run execute if block ~12 ~1 ~ minecraft:redstone_block run setblock ~ ~1 ~ gold_block
execute positioned ~12 ~ ~ run function build:path
Excellent, That is a good sign. Now my next step in this is to setup a random build sequence and I was thinking if its now possible through a scoreboard command chain or should I go about it using tags. I have a couple ideas and methods I can go about it, other then that I got all the command are practically ready.
For example, there is a randomizer (scoreboard, I don't know how to make one) that adds a random tag onto the "Drone". If the drone has a tag of "1", combination #1 is built and if it is "2", combination #2 is build etc...
Now I got to searching for a potential way to establish random values and I think I found the video your talking about or something similar. While Its an interesting way to go about creating randomness I believe its not necessarily suited for what I'm doing.
So I'm wondering which method I should go about in setting a random number score? I believe in theory something like this command below could possibly work for establishing an random number score. My goal here is to basically to have one command that will randomly assign a score value on to the builder so that it will carry out specific set of commands.
scoreboard players set @e[type=armor_stand,name=builder] path 1..4
Excellent, That is a good sign. Now my next step in this is to setup a random build sequence and I was thinking if its now possible through a scoreboard command chain or should I go about it using tags. I have a couple ideas and methods I can go about it, other then that I got all the command are practically ready.
Now I got to searching for a potential way to establish random values and I think I found the video your talking about or something similar. While Its an interesting way to go about creating randomness I believe its not necessarily suited for what I'm doing.
So I'm wondering which method I should go about in setting a random number score? I believe in theory something like this command below could possibly work for establishing an random number score. My goal here is to basically to have one command that will randomly assign a score value on to the builder so that it will carry out specific set of commands.
scoreboard players set @e[type=armor_stand,name=builder] path 1..4
Since the "@r" selector only works for players now... there is one simple way you can do this and should fit your needs.
Basically, you summon a couple of armor stands (one for each random number) and give them a score of the random number on their random objective.
/summon armor_stand ~ ~ ~ {Tags:["r_gen"]}
/scoreboard players set @e[tag=r_gen,limit=1,sort=nearest] random 1
/summon armor_stand ~ ~ ~ {Tags:["r_gen"]}
/scoreboard players set @e[tag=r_gen,limit=1,sort=nearest] random 2
/summon armor_stand ~ ~ ~ {Tags:["r_gen"]}
/scoreboard players set @e[tag=r_gen,limit=1,sort=nearest] random 3
and now to target a random armor stand and use its number:
/execute as @e[tag=num_holder] at @s run execute store result score @s random run scoreboard players get @e[tag=r_gen,limit=1,sort=random] random
now the armor stand with the tag "num_holder" has the random number in his objective. To activate your pre-defined building sequence:
/execute as @e[name=Drone] at @s if score @e[tag=num_holder] random matches 1 run function build:structure_1
and repeat for all other numbers. Really simple actually.
Since the "@r" selector only works for players now... there is one simple way you can do this and should fit your needs.
Basically, you summon a couple of armor stands (one for each random number) and give them a score of the random number on their random objective.
Now that interesting that you bring this method up because it is the one I'm most familiar with. All the dungeon build systems I made in 1.12 basically employ this method in which I use this command below as the random entity selector to determine the build direction. I agree Its very simple. One of my goals with the new set of commands structure is to employ a randomization method that only needs one armor stand to function off of, but if that the case and I'm still forced to create a path of randomness through summoning entities then I'll go for it, but for now I'm letting my mind take me in to a new direction to see what is possible. I pretty much have everything done only thing holding me back is what method I want to go in generating the pathways and because its a big structure I also feel the need to make the build process more efficient and effective.
Now that interesting that you bring this method up because it is the one I'm most familiar with. All the dungeon build systems I made in 1.12 basically employ this method in which I use this command below as the random entity selector to determine the build direction. I agree Its very simple. One of my goals with the new set of commands structure is to employ a randomization method that only needs one armor stand to function off of, but if that the case and I'm still forced to create a path of randomness through summoning entities then I'll go for it, but for now I'm letting my mind take me in to a new direction to see what is possible. I pretty much have everything done only thing holding me back is what method I want to go in generating the pathways and because its a big structure I also feel the need to make the build process more efficient and effective.
My method is easy but requires a lot of entities, if you want something that doesn't use so many entities but is harder, look into scoreboard gens.
Keep in mind that you can always switch between methods.
Thanks for advice, I agree this method is way easier. Now after leaning several of new ways to use execute commands I deiced its time to take what I have learned and apply it with what I've already made. Take note I have combined both the methods I've been learning so instead of relying on one armor stand builder method I had in my head, I took your advice and deiced for the sake of learning I will summon the armor stand in the four cardinal direction and build along those lines. Here is the complete build path function command process. Hopefully everything here works this time around. So I will give break down to what should be going on with these command. Stage 1 will Determine the available coordinates to build in by summoning one armor stand in each of the four cardinal directions, the next step will Select a Random Direction and then store that location with the builder, like a build order. Here the build order will place down a white wool block to start the backtracking stage of the command Ie Stage 0. Now Stage 0 can only function if the builder path score is set to zero and there is a white wool block until those two conditions are met other wise the function will stay in stage 1 and replace the white wool block with another white wool block until the path score value comes back 0 then it will place down an air block to finalize the build path processes.
#Build Path
#Stage 1 Determine Available Directions
scoreboard players set @e[type=armor_stand,name=builder] path 0
execute positioned ~ ~ ~ run execute if block ~12 ~1 ~ minecraft:redstone_block run summon armor_stand ~12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XP","R"]}
execute positioned ~ ~ ~ run execute if block ~-12 ~1 ~ minecraft:redstone_block run summon armor_stand ~-12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XN","R"]}
execute positioned ~ ~ ~ run execute if block ~ ~1 ~12 minecraft:redstone_block run summon armor_stand ~ ~ ~12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZP","R"]}
execute positioned ~ ~ ~ run execute if block ~ ~1 ~-12 minecraft:redstone_block run summon armor_stand ~ ~ ~-12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZN","R"]}
#Select Random Direction
tp @e[type=armor_stand,name=builder] @e[name=guide,type=armor_stand,tag=R,sort=random]
#set path score to builder to store direction path 1=XP 2=XN 3=ZP 4=ZN
execute at @e[type=armor_stand,name=builder] run execute if @e[type=armor_stand,name=guide,distance=1,tag=XP] run scoreboard players set @e[type=armor_stand,name=builder] path 1
execute at @e[type=armor_stand,name=builder] run execute if @e[type=armor_stand,name=guide,distance=1,tag=XN] run scoreboard players set @e[type=armor_stand,name=builder] path 2
execute at @e[type=armor_stand,name=builder] run execute if @e[type=armor_stand,name=guide,distance=1,tag=ZP] run scoreboard players set @e[type=armor_stand,name=builder] path 3
execute at @e[type=armor_stand,name=builder] run execute if @e[type=armor_stand,name=guide,distance=1,tag=ZN] run scoreboard players set @e[type=armor_stand,name=builder] path 4
#Remove Builders Guide
kill @e[name=guide,type=armor_stand,tag=R]
#Set white_wool for Backtracking block before the next direction is chosen
execute if score #builder path matches 1..4 run setblock ~ ~1 ~ white_wool
#Builder will build Path based on if path mathces score
execute if score #builder path matches 1 run fill ~2 ~1 ~-1 ~6 ~3 ~1 air
execute if score #builder path matches 1 positioned ~12 ~ ~ run function build:path
execute if score #builder path matches 2 run fill ~-2 ~1 ~-1 ~-6 ~3 ~1 air
execute if score #builder path matches 2 positioned ~-12 ~ ~ run function build:path
execute if score #builder path matches 3 run fill ~6 ~1 ~1 ~2 ~3 ~-1 air
execute if score #builder path matches 3 positioned ~ ~ ~12 run function build:path
execute if score #builder path matches 4 run fill ~-6 ~1 ~1 ~-2 ~3 ~-1 air
execute if score #builder path matches 4 positioned ~ ~ ~-12 run function build:path
#Stage 0 Start Backtrack phase if there are no available direction selection, path score will remain zero until new direction is found
execute if score #builder path matches 0 run setblock ~ ~1 ~ air
execute if score #builder path matches 0 execute if block ~12 ~1 ~ white_wool positioned ~-12 ~ ~ run function build:path
execute if score #builder path matches 0 execute if block ~-12 ~ ~ white_wool positioned ~12 ~ ~ run function build:path
execute if score #builder path matches 0 execute if block ~ ~1 ~12 white_wool positioned ~ ~ ~-12 run function build:path
execute if score #builder path matches 0 execute if block ~ ~1 ~-12 white_wool positioned ~ ~ ~12 run function build:path
-Edit- Just notice I still had the broken tp @r entity command in the build list above so I replace it with the command below
You had some mistakes in your code so I've corrected it
1. You put a "#" on "builder" in the last 5 lines
2. You put "execute if @e[...] " instead of "execute if entity @e[...]"
3. Instead of double executing like this "execute at @e[type=armor_stand,name=builder] run execute if ..." you can do "execute as @e[type=armor_stand,name=builder] if...run..." (not a mistake but can be improved)
Even though I fixed these mistakes, the script still won't work because "@r" only targets players in 1.13 and not random entities as it did in 1.12
Thanks for all the pointers. I fixed the mistakes, made the improvements, replaced the broken tp @r entity command, and even felt the need to add an execute positioned to some of the commands for more reliability. This time I hope everything is working.
#Build Path
#Stage 1 Determine Available Directions
scoreboard players set @e[type=armor_stand,name=builder] path 0
execute positioned ~ ~ ~ if block ~12 ~1 ~ minecraft:redstone_block run summon armor_stand ~12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XP","R"]}
execute positioned ~ ~ ~ if block ~-12 ~1 ~ minecraft:redstone_block run summon armor_stand ~-12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XN","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~12 minecraft:redstone_block run summon armor_stand ~ ~ ~12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZP","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~-12 minecraft:redstone_block run summon armor_stand ~ ~ ~-12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZN","R"]}
#Select Random Direction
tp @e[type=armor_stand,name=builder] @e[name=guide,type=armor_stand,tag=R,sort=random]
#Add oath score to builder to store direction path 1=XP 2=XN 3=ZP 4=ZN
execute at @e[type=armor_stand,name=builder] if @e[type=armor_stand,name=guide,distance=1,tag=XP] run scoreboard players set @e[type=armor_stand,name=builder] path 1
execute at @e[type=armor_stand,name=builder] if @e[type=armor_stand,name=guide,distance=1,tag=XN] run scoreboard players set @e[type=armor_stand,name=builder] path 2
execute at @e[type=armor_stand,name=builder] if @e[type=armor_stand,name=guide,distance=1,tag=ZP] run scoreboard players set @e[type=armor_stand,name=builder] path 3
execute at @e[type=armor_stand,name=builder] if @e[type=armor_stand,name=guide,distance=1,tag=ZN] run scoreboard players set @e[type=armor_stand,name=builder] path 4
#Remove Builders Guide
kill @e[name=guide,type=armor_stand,tag=R]
#Set white_wool for Backtracking block before the next direction is chosen
execute positioned ~ ~ ~ run if @e[type=armor_stand,name=builder,scores={path=1..4}] run setblock ~ ~1 ~ white_wool
#Builder will build Path based on if path mathces score
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=1}] run fill ~2 ~1 ~-1 ~6 ~3 ~1 air
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=1}] positioned ~12 ~ ~ run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=2}] run fill ~-2 ~1 ~-1 ~-6 ~3 ~1 air
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=2}] positioned ~-12 ~ ~ run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=3}] run fill ~6 ~1 ~-1 ~2 ~3 ~1 air
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=3}] positioned ~ ~ ~12 run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=4}] run fill ~-6 ~1 ~-1 ~-2 ~3 ~1 air
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=4}] positioned ~ ~ ~-12 run function build:path
#Stage 0 Start Backtrack phase if there are no available directions is chosen, score will remain zero until new direction is found
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=0}] run setblock ~ ~1 ~ air
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=0}] if block ~12 ~1 ~ white_wool positioned ~-12 ~ ~ run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=0}] if block ~-12 ~1 ~ white_wool positioned ~12 ~ ~ run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~12 white_wool positioned ~ ~ ~-12 run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~-12 white_wool positioned ~ ~ ~12 run function build:path
Thanks for all the pointers. I fixed the mistakes, made the improvements, replaced the broken tp @r entity command, and even felt the need to add an execute positioned to some of the commands for more reliability. This time I hope everything is working.
#Build Path
#Stage 1 Determine Available Directions
scoreboard players set @e[type=armor_stand,name=builder] path 0
execute positioned ~ ~ ~ if block ~12 ~1 ~ minecraft:redstone_block run summon armor_stand ~12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XP","R"]}
execute positioned ~ ~ ~ if block ~-12 ~1 ~ minecraft:redstone_block run summon armor_stand ~-12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XN","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~12 minecraft:redstone_block run summon armor_stand ~ ~ ~12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZP","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~-12 minecraft:redstone_block run summon armor_stand ~ ~ ~-12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZN","R"]}
#Select Random Direction
tp @e[type=armor_stand,name=builder] @e[name=guide,type=armor_stand,tag=R,sort=random]
#Add oath score to builder to store direction path 1=XP 2=XN 3=ZP 4=ZN
execute at @e[type=armor_stand,name=builder] if @e[type=armor_stand,name=guide,distance=1,tag=XP] run scoreboard players set @e[type=armor_stand,name=builder] path 1
execute at @e[type=armor_stand,name=builder] if @e[type=armor_stand,name=guide,distance=1,tag=XN] run scoreboard players set @e[type=armor_stand,name=builder] path 2
execute at @e[type=armor_stand,name=builder] if @e[type=armor_stand,name=guide,distance=1,tag=ZP] run scoreboard players set @e[type=armor_stand,name=builder] path 3
execute at @e[type=armor_stand,name=builder] if @e[type=armor_stand,name=guide,distance=1,tag=ZN] run scoreboard players set @e[type=armor_stand,name=builder] path 4
#Remove Builders Guide
kill @e[name=guide,type=armor_stand,tag=R]
#Set white_wool for Backtracking block before the next direction is chosen
execute positioned ~ ~ ~ run if @e[type=armor_stand,name=builder,scores={path=1..4}] run setblock ~ ~1 ~ white_wool
#Builder will build Path based on if path mathces score
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=1}] run fill ~2 ~1 ~-1 ~6 ~3 ~1 air
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=1}] positioned ~12 ~ ~ run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=2}] run fill ~-2 ~1 ~-1 ~-6 ~3 ~1 air
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=2}] positioned ~-12 ~ ~ run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=3}] run fill ~6 ~1 ~-1 ~2 ~3 ~1 air
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=3}] positioned ~ ~ ~12 run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=4}] run fill ~-6 ~1 ~-1 ~-2 ~3 ~1 air
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=4}] positioned ~ ~ ~-12 run function build:path
#Stage 0 Start Backtrack phase if there are no available directions is chosen, score will remain zero until new direction is found
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=0}] run setblock ~ ~1 ~ air
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=0}] if block ~12 ~1 ~ white_wool positioned ~-12 ~ ~ run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=0}] if block ~-12 ~1 ~ white_wool positioned ~12 ~ ~ run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~12 white_wool positioned ~ ~ ~-12 run function build:path
execute positioned ~ ~ ~ if @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~-12 white_wool positioned ~ ~ ~12 run function build:path
It works half way.
You forgot to include "entity" in the last 10+ lines again so I just added those.
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~-12 white_wool positioned ~ ~ ~12 run function build:path
other than that, other commands were ok so I started testing. The "builder" teleports to a random armor stand but for some reason, the score stays 0 on the "path" objective. Tried increasing the detect distance but still doesn't work.
other than that, other commands were ok so I started testing. The "builder" teleports to a random armor stand but for some reason, the score stays 0 on the "path" objective. Tried increasing the detect distance but still doesn't work.
Excellent, This is good news. I'm thrilled everything is starting to work out. Even despite the fact that its only working half way, I'm very confident its going to work this time around now that we are correcting all my mistakes... Now that is very interesting that the detect distance is not working, so after giving it some thought I came up with an solution, maybe the target selector should be like this where the distance=..1 instead of a flat 1 base range. So with my new found understanding I decided to implement it. If this works I can get started on phase two and three of the building process. Also I dont know if it is needed but to be safe I added a limit=1 to the teleport target selector.
#Build Path
#Stage 1 Determine Available Directions
scoreboard players set @e[type=armor_stand,name=builder] path 0
execute positioned ~ ~ ~ if block ~12 ~1 ~ minecraft:redstone_block run summon armor_stand ~12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XP","R"]}
execute positioned ~ ~ ~ if block ~-12 ~1 ~ minecraft:redstone_block run summon armor_stand ~-12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XN","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~12 minecraft:redstone_block run summon armor_stand ~ ~ ~12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZP","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~-12 minecraft:redstone_block run summon armor_stand ~ ~ ~-12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZN","R"]}
#Select Random Direction
tp @e[type=armor_stand,name=builder] @e[name=guide,type=armor_stand,tag=R,sort=random,limit=1]
#Add path score to builder to store direction path 1=XP 2=XN 3=ZP 4=ZN
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=XP] run scoreboard players set @e[type=armor_stand,name=builder] path 1
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=XN] run scoreboard players set @e[type=armor_stand,name=builder] path 2
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=ZP] run scoreboard players set @e[type=armor_stand,name=builder] path 3
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=ZN] run scoreboard players set @e[type=armor_stand,name=builder] path 4
#Remove Builders Guide
kill @e[name=guide,type=armor_stand,tag=R]
#Set white_wool for Backtracking block before the next direction is chosen
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1..4}] run setblock ~ ~1 ~ white_wool
#Builder will build Path based on if path mathces score
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1}] run fill ~2 ~1 ~-1 ~6 ~3 ~1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1}] positioned ~12 ~ ~ run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=2}] run fill ~-2 ~1 ~-1 ~-6 ~3 ~1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=2}] positioned ~-12 ~ ~ run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=3}] run fill ~6 ~1 ~1 ~2 ~3 ~-1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=3}] positioned ~ ~ ~12 run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=4}] run fill ~-6 ~1 ~1 ~-2 ~3 ~-1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=4}] positioned ~ ~ ~-12 run function build:path
#Stage 0 Start Backtrack phase if there are no available directions chosen, score will remain zero until new direction is found
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] run setblock ~ ~1 ~ air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~12 ~1 ~ white_wool positioned ~-12 ~ ~ run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~-12 ~1 ~ white_wool positioned ~12 ~ ~ run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~12 white_wool positioned ~ ~ ~-12 run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~-12 white_wool positioned ~ ~ ~12 run function build:path
Excellent, This is good news. I'm thrilled everything is starting to work out. Even despite the fact that its only working half way, I'm very confident its going to work this time around now that we are correcting all my mistakes... Now that is very interesting that the detect distance is not working, so after giving it some thought I came up with an solution, maybe the target selector should be like this where the distance=..1 instead of a flat 1 base range. So with my new found understanding I decided to implement it. If this works I can get started on phase two and three of the building process. Also I dont know if it is needed but to be safe I added a limit=1 to the teleport target selector.
#Build Path
#Stage 1 Determine Available Directions
scoreboard players set @e[type=armor_stand,name=builder] path 0
execute positioned ~ ~ ~ if block ~12 ~1 ~ minecraft:redstone_block run summon armor_stand ~12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XP","R"]}
execute positioned ~ ~ ~ if block ~-12 ~1 ~ minecraft:redstone_block run summon armor_stand ~-12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XN","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~12 minecraft:redstone_block run summon armor_stand ~ ~ ~12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZP","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~-12 minecraft:redstone_block run summon armor_stand ~ ~ ~-12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZN","R"]}
#Select Random Direction
tp @e[type=armor_stand,name=builder] @e[name=guide,type=armor_stand,tag=R,sort=random,limit=1]
#Add path score to builder to store direction path 1=XP 2=XN 3=ZP 4=ZN
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=XP] run scoreboard players set @e[type=armor_stand,name=builder] path 1
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=XN] run scoreboard players set @e[type=armor_stand,name=builder] path 2
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=ZP] run scoreboard players set @e[type=armor_stand,name=builder] path 3
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=ZN] run scoreboard players set @e[type=armor_stand,name=builder] path 4
#Remove Builders Guide
kill @e[name=guide,type=armor_stand,tag=R]
#Set white_wool for Backtracking block before the next direction is chosen
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1..4}] run setblock ~ ~1 ~ white_wool
#Builder will build Path based on if path mathces score
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1}] run fill ~2 ~1 ~-1 ~6 ~3 ~1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1}] positioned ~12 ~ ~ run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=2}] run fill ~-2 ~1 ~-1 ~-6 ~3 ~1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=2}] positioned ~-12 ~ ~ run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=3}] run fill ~6 ~1 ~1 ~2 ~3 ~-1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=3}] positioned ~ ~ ~12 run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=4}] run fill ~-6 ~1 ~1 ~-2 ~3 ~-1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=4}] positioned ~ ~ ~-12 run function build:path
#Stage 0 Start Backtrack phase if there are no available directions chosen, score will remain zero until new direction is found
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] run setblock ~ ~1 ~ air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~12 ~1 ~ white_wool positioned ~-12 ~ ~ run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~-12 ~1 ~ white_wool positioned ~12 ~ ~ run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~12 white_wool positioned ~ ~ ~-12 run function build:path
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~-12 white_wool positioned ~ ~ ~12 run function build:path
Ok judging by your screen shot, I made a small adjustment to the command where I store the direction path to fix that. Now I have a couple of questions here. How is the command function loop working out for you? Have you been able to generate an entire pathway for the bottom base? Also I added that test:test part to the command to make things more accessible.
#Build Path
#Stage 1 Determine Available Directions
scoreboard players set @e[type=armor_stand,name=builder] path 0
execute positioned ~ ~ ~ if block ~12 ~1 ~ minecraft:redstone_block run summon armor_stand ~12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XP","R"]}
execute positioned ~ ~ ~ if block ~-12 ~1 ~ minecraft:redstone_block run summon armor_stand ~-12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XN","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~12 minecraft:redstone_block run summon armor_stand ~ ~ ~12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZP","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~-12 minecraft:redstone_block run summon armor_stand ~ ~ ~-12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZN","R"]}
#Select Random Direction
tp @e[type=armor_stand,name=builder] @e[name=guide,type=armor_stand,tag=R,sort=random,limit=1]
#Add path score to builder to store direction path 1=ZP 2=ZN 3=XP 4=XN
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=ZP] run scoreboard players set @e[type=armor_stand,name=builder] path 1
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=ZN] run scoreboard players set @e[type=armor_stand,name=builder] path 2
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=XP] run scoreboard players set @e[type=armor_stand,name=builder] path 3
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=XN] run scoreboard players set @e[type=armor_stand,name=builder] path 4
#Remove Builders Guide
kill @e[name=guide,type=armor_stand,tag=R]
#Set white_wool for Backtracking block before the next direction is chosen
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1..4}] run setblock ~ ~1 ~ white_wool
#Builder will build Path based on if path mathces score
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1}] run fill ~2 ~1 ~-1 ~6 ~3 ~1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=3}] positioned ~12 ~ ~ run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=2}] run fill ~-2 ~1 ~-1 ~-6 ~3 ~1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=4}] positioned ~-12 ~ ~ run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=3}] run fill ~6 ~1 ~1 ~2 ~3 ~-1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1}] positioned ~ ~ ~12 run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=4}] run fill ~-6 ~1 ~1 ~-2 ~3 ~-1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=2}] positioned ~ ~ ~-12 run function test:test
#Stage 0 Start Backtrack phase if there are no available directions chosen, score will remain zero until new direction is found
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] run setblock ~ ~1 ~ air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~12 ~1 ~ white_wool positioned ~-12 ~ ~ run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~-12 ~1 ~ white_wool positioned ~12 ~ ~ run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~12 white_wool positioned ~ ~ ~-12 run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~-12 white_wool positioned ~ ~ ~12 run function test:test
I didn't run it in a loop at first (forgot to change build:path to test:test) so I ran it manually a couple of times. Then I ran it in a loop (your new set of commands with test:test implemented) and I was able to generate this pattern.
That is starting to look good. The previous screenshot got me thinking and after taking the time to look back through my coordinates sheet I notice some anomalies in there so after some adjustments In the the commands they should now all be properly executing now, And I also added more to the backtrack function.
#Build Path
#Stage 1 Determine Available Directions
scoreboard players set @e[type=armor_stand,name=builder] path 0
execute positioned ~ ~ ~ if block ~12 ~1 ~ redstone_block run summon armor_stand ~12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XP","R"]}
execute positioned ~ ~ ~ if block ~-12 ~1 ~ redstone_block run summon armor_stand ~-12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XN","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~12 redstone_block run summon armor_stand ~ ~ ~12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZP","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~-12 redstone_block run summon armor_stand ~ ~ ~-12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZN","R"]}
#Select Random Direction
tp @e[type=armor_stand,name=builder] @e[name=guide,type=armor_stand,tag=R,sort=random,limit=1]
#Add path score to builder to store direction path 1=XP 2=XN 3=ZP 4=ZN
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=XP] run scoreboard players set @e[type=armor_stand,name=builder] path 1
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=XN] run scoreboard players set @e[type=armor_stand,name=builder] path 2
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=ZP] run scoreboard players set @e[type=armor_stand,name=builder] path 3
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=ZN] run scoreboard players set @e[type=armor_stand,name=builder] path 4
#Remove Builders Guide
kill @e[name=guide,type=armor_stand,tag=R]
#Set white_wool for Backtracking block before the next direction is chosen
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1..4}] run setblock ~ ~1 ~ white_wool
#Builder will build Path based on if path matches score
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1}] run fill ~2 ~1 ~-1 ~6 ~3 ~1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1}] positioned ~12 ~ ~ run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=2}] run fill ~-2 ~1 ~-1 ~-6 ~3 ~1 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=2}] positioned ~-12 ~ ~ run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=3}] run fill ~-1 ~1 ~2 ~1 ~3 ~6 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=3}] positioned ~ ~ ~12 run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=4}] run fill ~-1 ~1 ~-2 ~1 ~3 ~-6 air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=4}] positioned ~ ~ ~-12 run function test:test
#Stage 0 Start Backtrack phase if there are no available directions chosen, score will remain zero until new direction is found
#Select Random Backtrack Direction
execute positioned ~ ~ ~ if block ~12 ~1 ~ white_wool run summon armor_stand ~12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XP","R"]}
execute positioned ~ ~ ~ if block ~-12 ~1 ~ white_wool run summon armor_stand ~-12 ~ ~ {CustomName:"{\"text\":\"guide\"}",Tags:["XN","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~12 white_wool run summon armor_stand ~ ~ ~12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZP","R"]}
execute positioned ~ ~ ~ if block ~ ~1 ~-12 white_wool run summon armor_stand ~ ~ ~-12 {CustomName:"{\"text\":\"guide\"}",Tags:["ZN","R"]}
#Select Random Direction
tp @e[type=armor_stand,name=builder] @e[name=guide,type=armor_stand,tag=R,sort=random,limit=1]
#Add path score to builder to store direction path 1=XP 2=XN 3=ZP 4=ZN
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=XP] run scoreboard players set @e[type=armor_stand,name=builder] path 1
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=XN] run scoreboard players set @e[type=armor_stand,name=builder] path 2
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=ZP] run scoreboard players set @e[type=armor_stand,name=builder] path 3
execute at @e[type=armor_stand,name=builder] if entity @e[type=armor_stand,name=guide,distance=..1,tag=ZN] run scoreboard players set @e[type=armor_stand,name=builder] path 4
#Remove Builders Guide
kill @e[name=guide,type=armor_stand,tag=R]
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1..4}] run setblock ~ ~1 ~ air
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=1}] if block ~12 ~1 ~ white_wool positioned ~-12 ~ ~ run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=2}] if block ~-12 ~1 ~ white_wool positioned ~12 ~ ~ run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=3}] if block ~ ~1 ~12 white_wool positioned ~ ~ ~-12 run function test:test
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=4}] if block ~ ~1 ~-12 white_wool positioned ~ ~ ~12 run function test:test
I found another excellent demonstration video and up to-date too on how to build mazes very fast. This video here by far has done an excellent job on establishing the workings of a basic command loop function and even expanded the its use with the help of the positioned that took me some time to understand and some other things, but once I started to work it all out the more it made sense to me to go about building up my commands that way.
So with that here are the first set of working commands. Give it a test and see how it works with the "BL Base level" portion of the pyramid because it will not work anywhere else. Below are the first group of commands which is the setup commands.
This next set of commands is what will build the pathways in the pyramid.in this post it will only build in the +x direction, and in theory the final command should repeat the build:path process over and over and pass this command function to detect each red stone block until it reached the last red stone block to finally halts its build process.
It doesn't do anything. Are the "Drone" and the "builder" armor stands supposed to be here (see screenshot) or a block above?
Command block engineer // Developer // #TeamTrees
Ok, I expected this to happen. I've already came up with a way on how to debug the function to find where the problem is. Just replace the command function group above with the Debug Function below and this time it should work. Also the red stone block looks perfect and so does both the armor stands. The red stone block is supposed to be at head/eye level with both the armor stands. Also use this command below if your going to start the function manually ,
Now if this Debug Function below removes the red stone blocks in a straight line then that's a good sign that means the relative coordinates are correct and the execute positioned function is working just fine. Here's the game plane hopefully with this execute positioned command function it will replace the need for the armor stand to move around to each location to build. Now the "Drone" armor stand should never move and is where the commands are going to be centered around. If this function below doesn't works, my suspicions is that execute positioned relative coordinates are not allowing the execute if block command coming back true thus canceling the next build task or the set block relative coordinates are not correct so I change the air block to a gold block for visual purposes. Now that should do
Debug Function
Debugging successful
Command block engineer // Developer // #TeamTrees
Very interesting, judging by your screenshot the function appears to have built the gold block in the same place three times, which is interesting because it proves the execute positioned command is working as intended because if it didn't the function would be stuck in a perpetual loop. Also it appears the execute if block command was still executing on the armor stand. Ok this should do the trick, try out this new command out. This time the function should build three gold blocks in a row leaving the last block as a red stone.
Another successful test
Command block engineer // Developer // #TeamTrees
Excellent, That is a good sign. Now my next step in this is to setup a random build sequence and I was thinking if its now possible through a scoreboard command chain or should I go about it using tags. I have a couple ideas and methods I can go about it, other then that I got all the command are practically ready.
Now I got to searching for a potential way to establish random values and I think I found the video your talking about or something similar. While Its an interesting way to go about creating randomness I believe its not necessarily suited for what I'm doing.
So I'm wondering which method I should go about in setting a random number score? I believe in theory something like this command below could possibly work for establishing an random number score. My goal here is to basically to have one command that will randomly assign a score value on to the builder so that it will carry out specific set of commands.
Since the "@r" selector only works for players now... there is one simple way you can do this and should fit your needs.
Basically, you summon a couple of armor stands (one for each random number) and give them a score of the random number on their random objective.
and now to target a random armor stand and use its number:
now the armor stand with the tag "num_holder" has the random number in his objective. To activate your pre-defined building sequence:
and repeat for all other numbers. Really simple actually.
Command block engineer // Developer // #TeamTrees
Now that interesting that you bring this method up because it is the one I'm most familiar with. All the dungeon build systems I made in 1.12 basically employ this method in which I use this command below as the random entity selector to determine the build direction. I agree Its very simple. One of my goals with the new set of commands structure is to employ a randomization method that only needs one armor stand to function off of, but if that the case and I'm still forced to create a path of randomness through summoning entities then I'll go for it, but for now I'm letting my mind take me in to a new direction to see what is possible. I pretty much have everything done only thing holding me back is what method I want to go in generating the pathways and because its a big structure I also feel the need to make the build process more efficient and effective.
My method is easy but requires a lot of entities, if you want something that doesn't use so many entities but is harder, look into scoreboard gens.
Keep in mind that you can always switch between methods.
Command block engineer // Developer // #TeamTrees
Thanks for advice, I agree this method is way easier. Now after leaning several of new ways to use execute commands I deiced its time to take what I have learned and apply it with what I've already made. Take note I have combined both the methods I've been learning so instead of relying on one armor stand builder method I had in my head, I took your advice and deiced for the sake of learning I will summon the armor stand in the four cardinal direction and build along those lines. Here is the complete build path function command process. Hopefully everything here works this time around. So I will give break down to what should be going on with these command. Stage 1 will Determine the available coordinates to build in by summoning one armor stand in each of the four cardinal directions, the next step will Select a Random Direction and then store that location with the builder, like a build order. Here the build order will place down a white wool block to start the backtracking stage of the command Ie Stage 0. Now Stage 0 can only function if the builder path score is set to zero and there is a white wool block until those two conditions are met other wise the function will stay in stage 1 and replace the white wool block with another white wool block until the path score value comes back 0 then it will place down an air block to finalize the build path processes.
-Edit- Just notice I still had the broken tp @r entity command in the build list above so I replace it with the command below
You had some mistakes in your code so I've corrected it
1. You put a "#" on "builder" in the last 5 lines
2. You put "execute if @e[...] " instead of "execute if entity @e[...]"
3. Instead of double executing like this "execute at @e[type=armor_stand,name=builder] run execute if ..." you can do "execute as @e[type=armor_stand,name=builder] if...run..." (not a mistake but can be improved)
Even though I fixed these mistakes, the script still won't work because "@r" only targets players in 1.13 and not random entities as it did in 1.12
Command block engineer // Developer // #TeamTrees
Thanks for all the pointers. I fixed the mistakes, made the improvements, replaced the broken tp @r entity command, and even felt the need to add an execute positioned to some of the commands for more reliability. This time I hope everything is working.
It works half way.
You forgot to include "entity" in the last 10+ lines again so I just added those.
execute positioned ~ ~ ~ if entity @e[type=armor_stand,name=builder,scores={path=0}] if block ~ ~1 ~-12 white_wool positioned ~ ~ ~12 run function build:path
and
execute positioned ~ ~ ~
runif @e[type=armor_stand,name=builder,scores={path=1..4}] run setblock ~ ~1 ~ white_woolother than that, other commands were ok so I started testing. The "builder" teleports to a random armor stand but for some reason, the score stays 0 on the "path" objective. Tried increasing the detect distance but still doesn't work.
Command block engineer // Developer // #TeamTrees
Excellent, This is good news. I'm thrilled everything is starting to work out. Even despite the fact that its only working half way, I'm very confident its going to work this time around now that we are correcting all my mistakes... Now that is very interesting that the detect distance is not working, so after giving it some thought I came up with an solution, maybe the target selector should be like this where the distance=..1 instead of a flat 1 base range. So with my new found understanding I decided to implement it. If this works I can get started on phase two and three of the building process. Also I dont know if it is needed but to be safe I added a limit=1 to the teleport target selector.
Finally making progress, here are the results
Command block engineer // Developer // #TeamTrees
Ok judging by your screen shot, I made a small adjustment to the command where I store the direction path to fix that. Now I have a couple of questions here. How is the command function loop working out for you? Have you been able to generate an entire pathway for the bottom base? Also I added that test:test part to the command to make things more accessible.
I didn't run it in a loop at first (forgot to change build:path to test:test) so I ran it manually a couple of times. Then I ran it in a loop (your new set of commands with test:test implemented) and I was able to generate this pattern.
Command block engineer // Developer // #TeamTrees
That is starting to look good. The previous screenshot got me thinking and after taking the time to look back through my coordinates sheet I notice some anomalies in there so after some adjustments In the the commands they should now all be properly executing now, And I also added more to the backtrack function.
Using us as slaves...
Jks lol