I have a quick question on the scoreboard system in minecraft. If I were to set a scoreboard value, for example
/scoreboard players set @a test 1
would I be able to get that value in another command? Using the testfor command, I can retrieve the numbers, but can I do this with commands such as /tp and /setblock?
/scoreboard players set @a test 1
would I be able to get that value in another command? Using the testfor command, I can retrieve the numbers, but can I do this with commands such as /tp and /setblock?
Create an account or sign in to comment.
14
It seems like what I'm asking for is currently impossible. Still, thanks for responding to my question even if it was slightly confusing.
Considering you are teleporting EVERYONE (with an objective or not) to everyone with the test score of 1 (sounds like one of my friends), what you could do is input this:
tp @a[score_test=0,score_test_min=0] @a[score_test=1,score_test_min=1]
Once again, I may not understand the question correctly, but it's my best shot. It will teleport all of the players with the test score between 0 and 0 to all of the players with the test score between 1 and 1. This may or may not have helped, but I gave it my best shot.
tp @a[score_test=0,score_test_min=0] @a[score_test=1,score_test_min=1]
Once again, I may not understand the question correctly, but it's my best shot. It will teleport all of the players with the test score between 0 and 0 to all of the players with the test score between 1 and 1. This may or may not have helped, but I gave it my best shot.
Actually you can
so according to your example '/scoreboard players set @a test 1
so @a is the player, test is the objective and 1 is the score
for tp you can do /tp @a[score_test=1,score_test_min=1] x y z
Im not sure about the /sethome but you can do the same for /setspawn
so the value its player[score_objective=value]
score_test=1 is the max and score_test_min=1 is the min
so according to your example '/scoreboard players set @a test 1
so @a is the player, test is the objective and 1 is the score
for tp you can do /tp @a[score_test=1,score_test_min=1] x y z
Im not sure about the /sethome but you can do the same for /setspawn
so the value its player[score_objective=value]
score_test=1 is the max and score_test_min=1 is the min
NO NO NO!
You misunderstood my question. @a[score_test=1,score_test_min=1] would return all players with the value of "test" equal to one. I am looking for a way to return the value of "test". Perhaps a better example of what I desire is this:
/say "test" is equal to <something to return value of "test">
So I'm not looking for a way to get which players have a value of "test" that is equal to one, I am looking for a way to return the value of "test", whether it is 1, 0,1000, or any other number, much like a variable.
You misunderstood my question. @a[score_test=1,score_test_min=1] would return all players with the value of "test" equal to one. I am looking for a way to return the value of "test". Perhaps a better example of what I desire is this:
/say "test" is equal to <something to return value of "test">
So I'm not looking for a way to get which players have a value of "test" that is equal to one, I am looking for a way to return the value of "test", whether it is 1, 0,1000, or any other number, much like a variable.
@poltercreeper, I am trying to use scoreboard objective values as arguments for other commands. I am looking for a way to return the scoreboard value in a way that could be used as such.
For example, I would make a scoreboard value:
/scoreboard players set a@ test 1
which would set the value of "test" for all players to 1.
Then, I want to be able to use that value not to get certain players or to check whether a player has that value, but instead use it as a variable to be used as an argument.
For example:
/tp a@ <something to return the value of test> 1 1
Which would teleport all players to a location with an x-coordinate of "test", and a y- and z-coordinate of 1.
@Stette
"test" would only have one value, as I would be setting it to all players. I could, however, change it using commands.
Once again, thank you for trying to answer my question.
For example, I would make a scoreboard value:
/scoreboard players set a@ test 1
which would set the value of "test" for all players to 1.
Then, I want to be able to use that value not to get certain players or to check whether a player has that value, but instead use it as a variable to be used as an argument.
For example:
/tp a@ <something to return the value of test> 1 1
Which would teleport all players to a location with an x-coordinate of "test", and a y- and z-coordinate of 1.
@Stette
"test" would only have one value, as I would be setting it to all players. I could, however, change it using commands.
Once again, thank you for trying to answer my question.
ah, i understand now, sadly, no, this is not possible in the current state of redstone, maybe in a future update
Oh well, thanks anyway!
How many different values would 'test' have?
No, what I want is to teleport everyone to a location with an x-coordinate that is equal to "test", in this case 1. Still, thanks for trying to answer. I guess I'll just have to do more research.
Oh, that makes sense. I don't think minecraft supports that though. Good luck on trying to find an answer though.
Achenar
/tp @a @a[test] 1 1
where @a[test] would return 1. However, this does not work, and I would like to know if there is a way to do this and how.
So, like it would teleport everyone with the "test" value of 1? I am not sure if there is a way to do that. I know a way to do it in a plugin, but not command blocks :/ I will research more on the topic, and report back if I see anything!
Sorry if my question was confusing, but you did misunderstand what I was asking. Here is what I am trying to do. I want to set a scoreboard value to a certain number.
For example,
/scoreboard players set @a test 1
Then I want to use this value in another command that is not /testfor. I already know that
/testfor @a[test=1]
would be used to check for the value, but I want to do something like this:
/tp @a @a[test] 1 1
where @a[test] would return 1. However, this does not work, and I would like to know if there is a way to do this and how.
Also, thank you for taking the time to answer my question.
For example,
/scoreboard players set @a test 1
Then I want to use this value in another command that is not /testfor. I already know that
/testfor @a[test=1]
would be used to check for the value, but I want to do something like this:
/tp @a @a[test] 1 1
where @a[test] would return 1. However, this does not work, and I would like to know if there is a way to do this and how.
Also, thank you for taking the time to answer my question.
heres how you do it
if your trying to do what i think your doing
/tp @a[score_test_min=1] 1 1
if your trying to do what i think your doing
I am not completely sure I understand your question, so forgive me if this answer doesn't have anything to do with your question , but here goes anyway.
I think you would be able to have a testfor command block with a comparator to a tp or setblock c-block. Hope this helps
I think you would be able to have a testfor command block with a comparator to a tp or setblock c-block. Hope this helps