-So I am attempting to set up purchasable protected plots using only command blocks.
My current set up is-
/clear @p[r=6] minecraft:gold_nugget -1 5
(Impulse,Unconditional,Needs Redstone)
/clear @p[r=6] minecraft:gold_nugget -1 1
(Chain,Conditional,Always Active)
-I have two so that it doesn't allow a person with less then the required amount of gold to purchase a plot.
Testfor @p[score_Home_Owner=1,r=6
(Chain,Conditional,Always Active)
/scoreboard players add @p[r=6] Home_Owner 1
(Chain,Conditional,Always Active)
-These are set up so a person can only own one plot. This is done by checking if a player has purchased a house before, if so they would be given the Home_Owner objective.
/scoreboard players add @p[r=6] Home_Owner_One 1
(Chain,Conditional,Always Active)
-This command block is set up to give the player who purchased the plot the Home_Owner_One objective (for plot one). so that only that person may enter the protected area. I will also make the command blocks delete themselves.
Once the player is given the tag they may walk over another block that goes-
What does not work is, once the gold is taken the command block chain does not continue to checkfor the Home_Owner tag and therefor does not add one nor does it add the Home_Owner_One tag.
Iv'e spent around 5 hours attempting to fix this so any help would be lovely. As well if anyone knows how to condense the command blocks i've written that would be helpful as well. Thank you.
The Meaning of Life, the Universe, and Everything.
Join Date:
12/29/2014
Posts:
45
Minecraft:
GGFreshest
Member Details
I don't fully understand how this system is going to work, a lot of things are inefficient. This is almost like trying to decipher a few sentences with words in the wrong order.
There is one possible issue that may be a problem here. The fact that your objectives are Home_Owner and Home_Owner_One may cause the bug.
I'm sure you know, as you used it here, that @p[score_<scoreName>_min] uses underscores "_" to separate your variable name from the system's parameters. Your underscores in the names of the objectives might be confusing the system.
I could probably rewrite the system more efficiently, but you would need to give a more detailed description on how you want it to work.
-So I am attempting to set up purchasable protected plots using only command blocks.
My current set up is-
/clear @p[r=6] minecraft:gold_nugget -1 5
(Impulse,Unconditional,Needs Redstone)
/clear @p[r=6] minecraft:gold_nugget -1 1
(Chain,Conditional,Always Active)
-I have two so that it doesn't allow a person with less then the required amount of gold to purchase a plot.
Testfor @p[score_Home_Owner=1,r=6
(Chain,Conditional,Always Active)
/scoreboard players add @p[r=6] Home_Owner 1
(Chain,Conditional,Always Active)
-These are set up so a person can only own one plot. This is done by checking if a player has purchased a house before, if so they would be given the Home_Owner objective.
/scoreboard players add @p[r=6] Home_Owner_One 1
(Chain,Conditional,Always Active)
-This command block is set up to give the player who purchased the plot the Home_Owner_One objective (for plot one). so that only that person may enter the protected area. I will also make the command blocks delete themselves.
Once the player is given the tag they may walk over another block that goes-
/testfor @p[score_Home_Owner_One=1,r=6]
(Impulse,Unconditional,Needs Redstone)
/tp @p ~-5 ~ ~
(Chain,Conditional,Always Active)
--------------------------------------------------------------
Taking the gold works
The teleportating works once I get the tag
What does not work is, once the gold is taken the command block chain does not continue to checkfor the Home_Owner tag and therefor does not add one nor does it add the Home_Owner_One tag.
Iv'e spent around 5 hours attempting to fix this so any help would be lovely. As well if anyone knows how to condense the command blocks i've written that would be helpful as well. Thank you.
I don't fully understand how this system is going to work, a lot of things are inefficient. This is almost like trying to decipher a few sentences with words in the wrong order.
There is one possible issue that may be a problem here. The fact that your objectives are Home_Owner and Home_Owner_One may cause the bug.
I'm sure you know, as you used it here, that @p[score_<scoreName>_min] uses underscores "_" to separate your variable name from the system's parameters. Your underscores in the names of the objectives might be confusing the system.
I could probably rewrite the system more efficiently, but you would need to give a more detailed description on how you want it to work.