Steps:
Start a server and join it as op in creative
Type these commands: (So your scoreboard is prepared)
/scoreboard objectives add Test dummy /scoreboard objectives setdisplay sidebar Test 0
Type these commands: (You are the only tracked player)
/scoreboard players set <yourPlayerName> Test 0 /scoreboard players set <friendPlayerName> Test 0 /scoreboard players set <non-existantPlayerName> Test 0
Type these commands: (This only change your score)
/scoreboard players set @a Test 1
Let a friend join the server
Type these commands: (Your friend is tracked)
/scoreboard players set <friendPlayerName> Test 1
Type these commands: (Your friend score and yours is set to 2)
/scoreboard players set @a Test 2
Tell your friend to leave the server
Type these commands: (You can't change his score when he's offline, whenever he's tracked)
/scoreboard players set <friendPlayerName> Test 1
Type these commands: (You can only change the score of online players, whenever other are tracked)
/scoreboard players set @a Test 0
Description:
It's only possible to change score for online tracked players.
Expected:
Having the possibility to change the score an already tracked players.
Having @a selectors to change the score of all tracked players of the specified objective, additionaly to connected players
Having the possibility to add an offline player to the list of tracked player for one objective, if their names is given explicitly.
Actual:
Since a player is tracked for a scoreboard and he's not on the server,
It's not possible to change his score, when we use his name explicitly or with selectors such as @a.
It's not possible to set a name for a player that's not on the server or non-existant player.
Linked issues
is duplicated by 4
Comments 21
There needs to be a command like /scoreboard players setall Test 0. @a isn't going to work on offline players.
So I think it's needed to add a special selector that read into the "scoreboard player list" instead of "online player list" ... It's possible now to set a score for non-existant or offline player ... Why not the possibility to test if a tracked player is in a scoreboard.
I am glad to see this issue is being tracked; without the ability to set objectives when players are offline, there is no other method (to my knowledge) to test for when players leave mid-game in pvp maps.
While I have not tested using the OPs method, I can say this still exists in 1.6.1 Release. I'm using "non-existant" players to track map specific options. This was tested in single player as I am developing a map that will be intended for ssp and smp.
Create a configuration scoreboard:
/scoreboard objectives add CONFIG dummy CONFIG
Add it to the sidebar
/scoreboard objectives setdisplay sidebar CONFIG
Add yourself and a non-existant player
/scoreboard players add "your_real_player_name" CONFIG 0
/scoreboard players add "non-existant_player_name" CONFIG 0
Create some redstone contraption to check with. I used a redstone clock->command block->comparator->redstone dust->piston
Edit the command block to use this command:
/testfor @a[name="your_real_player_name_here",score_CONFIG_min=0]
The Piston will extend.
Edit the command block to use this command:
/testfor @a[name="your_non-existant_player_name_here",score_CONFIG_min=0]
The Piston will retract as the non-existant player is not online.
A work around could be to use enitre scoreboards for EACH option and attach scores to all players, but that I would think, would add unnecessary bloat to the scoreboard.dat file.
I hope this is not intended behavior. This scoreboard system will have much more potential as custom variable system.
THIS HAS BEEN FIXED. In 1.7.4, you can change the score of an offline or non-existent player. Can I get someone to confirm and close this?
But not by @selector. Nor with /testfor. You can't do /testfor @a[score_isVar_min=1,score_FOO_min=20].
Ah. I see what you mean. You can, however, change offline players directly, without the use of a selector. /scoreboard players set Notch FOO 1 works. Sadly this isn't very useful without testfor, I'd love to be able to specify the player in testfor. Testing for "Foo" will always return yes if there are no online players with that objective.
Really want this to be fixed, so hard-wired variables can be used in adventure maps.
And this has now been fixed in 14w07a. A new argument to the /scoreboard syntax called "test" has been added:
/scoreboard players test <player> <objective> <min> <max>
You can prefix fake players with a # symbol so they don't show up on any scoreboard displays, but is not required for testing. An example command:
/scoreboard players test FAKEPLAYER testObjective 0 1
Can confirm with sethbling: http://www.youtube.com/watch?v=XnU792590CQ#t=342 (5:40 in).
Confirmed in 1.5pre Uff! This was difficult to reproduce. 😃