1

Question on /scoreboard

Achenar's Avatar Achenar12/8/13 1:30 pm
12/9/2013 3:53 pm
Achenar's Avatar Achenar
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?
Posted by Achenar's Avatar
Achenar
Level 1 : New Explorer
0

Create an account or sign in to comment.

14

Achenar
12/09/2013 3:53 pm
Level 1 : New Explorer
Achenar's Avatar
It seems like what I'm asking for is currently impossible. Still, thanks for responding to my question even if it was slightly confusing.
1
Almost 8-bit Gaming
12/09/2013 7:32 am
Level 8 : Apprentice Crafter
Almost 8-bit Gaming's Avatar
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.
1
Brennen3828
12/08/2013 11:27 pm
Level 6 : Apprentice Explorer
Brennen3828's Avatar
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
1
Achenar
12/09/2013 3:51 pm
Level 1 : New Explorer
Achenar's Avatar
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.
1
Achenar
12/08/2013 3:11 pm
Level 1 : New Explorer
Achenar's Avatar
@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.
1
poltercreeper
12/08/2013 5:28 pm
Level 16 : Journeyman Goblin
poltercreeper's Avatar
ah, i understand now, sadly, no, this is not possible in the current state of redstone, maybe in a future update
1
Achenar
12/08/2013 10:34 pm
Level 1 : New Explorer
Achenar's Avatar
Oh well, thanks anyway!
1
Stette
12/08/2013 1:55 pm
Level 1 : New Miner
Stette's Avatar
How many different values would 'test' have?
1
Achenar
12/08/2013 1:47 pm
Level 1 : New Explorer
Achenar's Avatar
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.
1
Tudedude100
12/08/2013 1:48 pm
Level 35 : Artisan Nerd
Tudedude100's Avatar
Oh, that makes sense. I don't think minecraft supports that though. Good luck on trying to find an answer though.
1
Tudedude100
12/08/2013 1:44 pm
Level 35 : Artisan Nerd
Tudedude100's Avatar
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!
1
Achenar
12/08/2013 1:40 pm
Level 1 : New Explorer
Achenar's Avatar
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.
1
poltercreeper
12/08/2013 1:53 pm
Level 16 : Journeyman Goblin
poltercreeper's Avatar
heres how you do it
/tp @a[score_test_min=1] 1 1
if your trying to do what i think your doing
1
Tudedude100
12/08/2013 1:34 pm
Level 35 : Artisan Nerd
Tudedude100's Avatar
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
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome