This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hello everyone,
I work on a very complicated project with command blocks recently and here is my problem ;
Can we make a testfor command that check if an entity is NOT somewhere !
(Here is the command that check if an armor stand IS somewhere)
/testfor @e[type=ArmorStand,x=565,y=56,z=368]
I thank in advance everyone who would help me ! Bye
What you need is scoreboard, or something to deal with the 'auto' tag of command blocks.
Scoreboard:
scoreboard players set have_armorstand obj 0
execute @e[type=ArmorStand,x=565,y=56,z=368] ~ ~ ~ scoreboard players set have_armorstand obj 1
————————————————————————————————————————————————————————
cond:<command> means that command is in a conditional command block
mark <name> means that at the coordinate of the next command block, there would be an armorstand named <name>
Commands dealing with auto tag of command block(in 1.9/1.10):
execute @e[type=ArmorStand,name=false] ~ ~ ~ blockdata ~ ~ ~ {auto:1b}
cond:execute @e[type=ArmorStand,name=false] ~ ~ ~ blockdata ~ ~ ~ {auto:0b}
mark false
<command that need to be executed>
P.S. For each commands that need to be executed when the testfor command is fail, they need a mark before them, or you can just use conditional if wanted(but if one of the command inside it is failed, the commands after it would not be executed)
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/2703820-command-pcb-command-editor-ooc-generator-for-mc-1
pcb, a command editor and OOC generator
I just made this for you:
My projects: https://blockbench.net/hub
Hi ! Thank you so much ! That's really really cool !
Hello everyone,
I work on a very complicated project with command blocks recently and here is my problem ;
Can we make a testfor command that check if an entity is NOT somewhere !
(Here is the command that check if an armor stand IS somewhere)
I thank in advance everyone who would help me ! Bye
What you need is scoreboard, or something to deal with the 'auto' tag of command blocks.
Scoreboard:
scoreboard players set have_armorstand obj 0
execute @e[type=ArmorStand,x=565,y=56,z=368] ~ ~ ~ scoreboard players set have_armorstand obj 1
————————————————————————————————————————————————————————
cond:<command> means that command is in a conditional command block
mark <name> means that at the coordinate of the next command block, there would be an armorstand named <name>
Commands dealing with auto tag of command block(in 1.9/1.10):
execute @e[type=ArmorStand,name=false] ~ ~ ~ blockdata ~ ~ ~ {auto:1b}
/testfor @e[type=ArmorStand,x=565,y=56,z=368]
cond:execute @e[type=ArmorStand,name=false] ~ ~ ~ blockdata ~ ~ ~ {auto:0b}
mark false
<command that need to be executed>
P.S. For each commands that need to be executed when the testfor command is fail, they need a mark before them, or you can just use conditional if wanted(but if one of the command inside it is failed, the commands after it would not be executed)
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/2703820-command-pcb-command-editor-ooc-generator-for-mc-1
pcb, a command editor and OOC generator
I just made this for you:
My projects: https://blockbench.net/hub
Hi ! Thank you so much ! That's really really cool !