The Meaning of Life, the Universe, and Everything.
Join Date:
10/9/2014
Posts:
56
Minecraft:
Asxulxet
Member Details
Ok. So I made a command block door that opens when a player from a certain team (scoreboard system) pushes a button and is near enough. It is closed with a pressure plate that'll close it when the player leaves. I try to reopen the door, but nothing happens. How I have it set up is that, when the button is pushed a command blocks tests for @p[r=3] . If it is confirmed, another command block will test for "scoreboard players test @p room 1 1". I have set myself set fine--the door opens, but only once. I know the command blocks must be reactivated for the output deactivate. But how can I do that if the nearest player is the one in the room--the one for which the door opens. It won't deactivate unless someone not from the teams is nearer, which defeats the point. Any help, advice, or solutions would be greatly appreciated.
P.S. I'm trying the keep the mechanics to a max height of one block.
Rollback Post to RevisionRollBack
Says the drummer of New Song: Playing for an audience of ONE
The problem is that the previous output is still true.. The command block needs to update after you pass through the door and are no longer in range at least once before you can perform the action again.. It only updates when it receives a redstone signal.The only thing I can say to do would be for you have it perform an execute command instead that would do what you are trying to do.
You can actually reset the commands without having to worry about how close the player is, or sending another signal to the command block. Just use the blockdata command, and replace x y z with the coordinates of the command block you want to reset (absolute or relative):
blockdata x y z {SuccessCount:0}
Just run this on both command blocks when they return true, and you should be able to press the button as much as you want without having to reset.
Rollback Post to RevisionRollBack
I like to do redstone builds on my channel, and I can probably help you with your in game troubles.
You can actually reset the commands without having to worry about how close the player is, or sending another signal to the command block. Just use the blockdata command, and replace x y z with the coordinates of the command block you want to reset (absolute or relative):
blockdata x y z {SuccessCount:0}
Just run this on both command blocks when they return true, and you should be able to press the button as much as you want without having to reset.
Didnt even think of that.. you could have that run off the pressure plate you have as you exit through the door...
Rollback Post to RevisionRollBack
Creator of The Doomed Series! My Newest Map Is: Castle of Doom! Link: Here
The Meaning of Life, the Universe, and Everything.
Join Date:
10/9/2014
Posts:
56
Minecraft:
Asxulxet
Member Details
That is helpful I think, I'm not sure because of my lack of experience. But my problem is having to reset the command block that tests for the nearest player being on the team for not. If the team is always nearest, then the output will allways be true and never false. But the team is supposed to be closest for the door to open. I have a small brain and need a little more clarity...
Rollback Post to RevisionRollBack
Says the drummer of New Song: Playing for an audience of ONE
That is helpful I think, I'm not sure because of my lack of experience. But my problem is having to reset the command block that tests for the nearest player being on the team for not. If the team is always nearest, then the output will allways be true and never false. But the team is supposed to be closest for the door to open. I have a small brain and need a little more clarity...
basically what that is doing is resetting the command block. Just change the coordinates to the same coordinates as where the command block is located and run it off of the pressure plate you have after the door. That way it will test every time the button is pressed then reset when that person enters.
Rollback Post to RevisionRollBack
Creator of The Doomed Series! My Newest Map Is: Castle of Doom! Link: Here
The Meaning of Life, the Universe, and Everything.
Join Date:
10/9/2014
Posts:
56
Minecraft:
Asxulxet
Member Details
So I push the button and the command block searching for the team member activates and and output stays true. I walk out the door and on the pressure plate and the fore-mentioned command block's output is set to false?
Rollback Post to RevisionRollBack
Says the drummer of New Song: Playing for an audience of ONE
So I push the button and the command block searching for the team member activates and and output stays true. I walk out the door and on the pressure plate and the fore-mentioned command block's output is set to false?
Yes and you will be able to repeat the process as much as you like
P.S. I'm trying the keep the mechanics to a max height of one block.
Check out Lets Play awesomeness www.youtube.com/AricaraGames
Subscribe to my youtube channel! www.youtube.com/Darkjgaming
I like to do redstone builds on my channel, and I can probably help you with your in game troubles.
Didnt even think of that.. you could have that run off the pressure plate you have as you exit through the door...
Check out Lets Play awesomeness www.youtube.com/AricaraGames
Subscribe to my youtube channel! www.youtube.com/Darkjgaming
basically what that is doing is resetting the command block. Just change the coordinates to the same coordinates as where the command block is located and run it off of the pressure plate you have after the door. That way it will test every time the button is pressed then reset when that person enters.
Check out Lets Play awesomeness www.youtube.com/AricaraGames
Subscribe to my youtube channel! www.youtube.com/Darkjgaming
Yes and you will be able to repeat the process as much as you like
Check out Lets Play awesomeness www.youtube.com/AricaraGames
Subscribe to my youtube channel! www.youtube.com/Darkjgaming