I have been having problems with the latest version of Minecraft, 1.5.0 (Unmodded Vanilla).
So I was really excited when I heard about the new features about the command blocks that were being added, so I wanted to add some ''touches'' to my server in order to make it more fun, of course!
So I tried out the new commands and arguments, such as making scoreboards, which I want to use for many things. I made some scoreboard, that works fine, but then I try to make a shop using one of them.
This is where I have problems. Ok, here's what I did, I created a scoreboard named gold which counts the amount of total kills (/scoreboard objectives add gold totalKillCount Gold), then I display it in a list (/scoreboard objectives setdisplay list gold). So this works well enough, I can see the Gold scoreboard in my list, then I kill a bunch of mobs, anything. So I set up a shop with redstone and command blocks.
The device itself is a button that sends a current to a repeater which then sends current to a command block which does this (/testfor @p[gold=1]) or (/testfor @p[gold_min=1]), and I have more than one ''gold''. On top of that command block, there is a restone torch which has a block with another redstone torch won its side (which is now turned off, due to the other one) and there is a sicky piston next to the redston which pushes a block down and pulls it back. Now back to the command block, it is linked to a comparator which then sends a signal to two command blocks, one for giving the object and one for taking away ''gold''. there is space for the block that the piston pushes so it let's the signal through temporarily.
Let's hope this was clear enough... haha.
Anywho, this is where the red flag happens. I push on the button, it sends a signal and everything works fine and gives me the opject, but the command block which tests for the ''gold'' never turns off, no matter what my ''gold'' is at! So if minium is 1 for example, it'll still operate even if I have -9, which is just strange.
So i've been trying to delete the objective/scoreboard and tested different ways of operating it, but so far, no luck. So in the end I wonder if my redstone is wrong, the commands and arguments are wrong, or maybe you can't use the totalKillCount as money (which would be weird in my opinion). Whatever it is, it sure is annoying, I can tell you that! Haha.
Anywho, thank you for taking the time to read this, I hope I was clear enough, I apologize in advance if I wasn't. If you have a solution, please tell me! I would be truly greatful.
Here's you problem. From what I understand every time you push the button you expect the command block to update itself. This only updates itself every time its powered so even thought you have it test for the closest player it will only update that when powered. The best solution is to have the button power the command block each time so it gets updated ,but then have the comparator thats coming out of the command block power a sticky piston that moves a block into place allowing a repeater to power that block and then power two other command blocks.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have been having problems with the latest version of Minecraft, 1.5.0 (Unmodded Vanilla).
So I was really excited when I heard about the new features about the command blocks that were being added, so I wanted to add some ''touches'' to my server in order to make it more fun, of course!
So I tried out the new commands and arguments, such as making scoreboards, which I want to use for many things. I made some scoreboard, that works fine, but then I try to make a shop using one of them.
This is where I have problems. Ok, here's what I did, I created a scoreboard named gold which counts the amount of total kills (/scoreboard objectives add gold totalKillCount Gold), then I display it in a list (/scoreboard objectives setdisplay list gold). So this works well enough, I can see the Gold scoreboard in my list, then I kill a bunch of mobs, anything. So I set up a shop with redstone and command blocks.
The device itself is a button that sends a current to a repeater which then sends current to a command block which does this (/testfor @p[gold=1]) or (/testfor @p[gold_min=1]), and I have more than one ''gold''. On top of that command block, there is a restone torch which has a block with another redstone torch won its side (which is now turned off, due to the other one) and there is a sicky piston next to the redston which pushes a block down and pulls it back. Now back to the command block, it is linked to a comparator which then sends a signal to two command blocks, one for giving the object and one for taking away ''gold''. there is space for the block that the piston pushes so it let's the signal through temporarily.
Let's hope this was clear enough... haha.
Anywho, this is where the red flag happens. I push on the button, it sends a signal and everything works fine and gives me the opject, but the command block which tests for the ''gold'' never turns off, no matter what my ''gold'' is at! So if minium is 1 for example, it'll still operate even if I have -9, which is just strange.
So i've been trying to delete the objective/scoreboard and tested different ways of operating it, but so far, no luck. So in the end I wonder if my redstone is wrong, the commands and arguments are wrong, or maybe you can't use the totalKillCount as money (which would be weird in my opinion). Whatever it is, it sure is annoying, I can tell you that! Haha.
Anywho, thank you for taking the time to read this, I hope I was clear enough, I apologize in advance if I wasn't. If you have a solution, please tell me! I would be truly greatful.