The Meaning of Life, the Universe, and Everything.
Location:
Gent
Join Date:
10/25/2017
Posts:
67
Location:
Belgium
Minecraft:
Khoeckman
Discord:
bledder#4820
Member Details
Hi Guys!
I'm really wondering how i can make an IF NOT STATEMENT without redstone. I know i you set the command block on CONDITIONAL it will only run if the command poining to it has a SuccesCount of 1 (true output) but how to only activate the commandblock if the commandblock pointing to it has a SuccesCount of 0 (false output) i really need this for like
/testfor @a[r=10] IF NOT {
tp @a ~ ~10 ~
}
No i dont want an if else statement or a toggle statement just an IF NOT statement THX!!!
The Meaning of Life, the Universe, and Everything.
Location:
Gent
Join Date:
10/25/2017
Posts:
67
Location:
Belgium
Minecraft:
Khoeckman
Discord:
bledder#4820
Member Details
its was just an example i do much complicater things command over 100000 characters... its just if something is false it will activate so if it finds no armorstand in a r=10 then it will spawn one
I feel like you could do that with a conditional command block and an inverter like have a block reference an area similarly to how the do conditional command block delays.
Within the commands you reference have a /testfor @e[type=!armorstand].
I think you will actually be working with /scoreboard but the idea it the same. Have your main command line and then have a /scoreboard that references the commands that will deal with the if not.
I created a scoreboard objective named "test" (type is dummy)
As you can see in the picture, I have an armor stand with a tag "reference" standing on the lapis block.
The repeating command block is setting the score of the "reference" armor stand to 1 on the "test" objective
/scoreboard players set @e[tag=reference,r=5] test 1
The 1.st chain command block is executing from any armor stand with tag=!reference within r=10 and resetting the score of the "reference" armor stand to stop it from summoning an armor stand if there is one already.
/execute @e[type=armor_stand,tag=!reference,r=10] ~ ~ ~ scoreboard players reset @e[tag=reference,r=10] test
And the 2.nd chain command block is executing from the "reference" armor stand (if it has a test score of 1) to summon the armor stand
/execute @e[tag=reference,score_test_min=1,r=5] ~ ~ ~ summon armor_stand <x> <y> <z> (replace <x> <y> <z> with the cordinates where the armor stand will spawn)
Note:
Make sure the 1.st chain command block is conditional and also it is very important to make sure the armor stand that is being summoned, is not summoned more than 10 blocks away from the "reference".
I created a scoreboard objective named "test" (type is dummy)
As you can see in the picture, I have an armor stand with a tag "reference" standing on the lapis block.
The repeating command block is setting the score of the "reference" armor stand to 1 on the "test" objective
/scoreboard players set @e[tag=reference,r=5] test 1
The 1.st chain command block is executing from any armor stand with tag=!reference within r=10 and resetting the score of the "reference" armor stand to stop it from summoning an armor stand if there is one already.
/execute @e[type=armor_stand,tag=!reference,r=10] ~ ~ ~ scoreboard players reset @e[tag=reference,r=10] test
And the 2.nd chain command block is executing from the "reference" armor stand (if it has a test score of 1) to summon the armor stand
/execute @e[tag=reference,score_test_min=1,r=5] ~ ~ ~ summon armor_stand <x> <y> <z> (replace <x> <y> <z> with the cordinates where the armor stand will spawn)
Note:
Make sure the 1.st chain command block is conditional and also it is very important to make sure the armor stand that is being summoned, is not summoned more than 10 blocks away from the "reference".
Hi Guys!
I'm really wondering how i can make an IF NOT STATEMENT without redstone. I know i you set the command block on CONDITIONAL it will only run if the command poining to it has a SuccesCount of 1 (true output) but how to only activate the commandblock if the commandblock pointing to it has a SuccesCount of 0 (false output) i really need this for like
/testfor @a[r=10] IF NOT {
tp @a ~ ~10 ~
}
No i dont want an if else statement or a toggle statement just an IF NOT statement THX!!!
Idk if there necessarily is. We might be able to work something. So you want people in an area to be teleported out under what not conditions?
its was just an example i do much complicater things command over 100000 characters... its just if something is false it will activate so if it finds no armorstand in a r=10 then it will spawn one
I feel like you could do that with a conditional command block and an inverter like have a block reference an area similarly to how the do conditional command block delays.
Within the commands you reference have a /testfor @e[type=!armorstand].
I think you will actually be working with /scoreboard but the idea it the same. Have your main command line and then have a /scoreboard that references the commands that will deal with the if not.
I've tried this and it works.
I created a scoreboard objective named "test" (type is dummy)
As you can see in the picture, I have an armor stand with a tag "reference" standing on the lapis block.
The repeating command block is setting the score of the "reference" armor stand to 1 on the "test" objective
The 1.st chain command block is executing from any armor stand with tag=!reference within r=10 and resetting the score of the "reference" armor stand to stop it from summoning an armor stand if there is one already.
And the 2.nd chain command block is executing from the "reference" armor stand (if it has a test score of 1) to summon the armor stand
Note:
Make sure the 1.st chain command block is conditional and also it is very important to make sure the armor stand that is being summoned, is not summoned more than 10 blocks away from the "reference".
Command block engineer // Developer // #TeamTrees
Really close to what I was going for. Great build!
tysm!!!