4 posts
Location
What Location?
Posted 19 July 2015 - 04:07 PM
Hello. I have just now tried the command computers, and I love them.
But. I have not been able to find anything about getting/pulling a scoreboard value.
What would the command be? My guess would be somthing like this:
commands.exec("scoreboard players (get) (player) (objective)")
3057 posts
Location
United States of America
Posted 19 July 2015 - 09:01 PM
commands.exec returns the text you'd see in chat. So if you can normally get values from the scoreboard, you can get it with a command computer (although you may need to use some string commands to parse it).
957 posts
Location
Web Development
Posted 19 July 2015 - 10:00 PM
Its
possible, but it isn't really simple.
The only way I've found to get the score of a player in chat is with this command:
/scoreboard players add <player> <objective> 1
That outputs this:
Set score of <objective> for player <player> to <new score>
(You could use a pattern to get the score)
After you've gotten the output from the first command, you'd just remove one from their score.
Edited on 19 July 2015 - 08:01 PM
4 posts
Location
What Location?
Posted 24 July 2015 - 12:04 PM
Thanks!
Edited on 24 July 2015 - 10:04 AM