I have been stuck on this for a couple of days now, and I haven't thought of a solution yet. As you all know, you can now display an objective score of a specific player using the /tellraw command. Keep in mind this map will be single player only, so scoreboard collisions are not a problem. Example:
However, the problem comes with who's the owner of the score. In this case, it is I. The command won't display the player's own score who is playing the map. I have realized that along with the new /tellraw display, you can now have global names. Example:
This would be the obvious solution, to use a global name instead of a regular player name. However, this comes with a consequence. You cannot use the player parameters with global names, such as anything imputed in the player parameters will act as part of the name, not a filter. For example:
/scoreboard players set @a[name=#PlayerMoney,score_Money_min=2] Money 5
The command will create a global name with the name "@a[name=#PlayerMoney,score_Money_min=2]" to a score of 5. No matter the score, the global 'player' is still created and change when it should only change if the score is higher than 2. Now, here is my question to you. Do you happen to know of a workaround this system, to tell the current player's score using the /tellraw command and be able to use the parameters at the same time? Perhaps we would need to use both a global and a current name (of the current player).
Could you not simply "scoreboard players test" for values greater than or equal to 2 then have a comparator output that activates:
scoreboard players set #PlayerMoney Money 5
I suppose I can; however, the whole setup is in a clock. It needs to activate every 2 ticks or so. Surely, it works when you set the score to five, but when you add a score of one it only activates once as it has a constant comparator signal.
Then instead of using dummies, use a bunch of non-despawnable entities with custom names.
That is very smart. For the moment, I used the /scoreboard test command and modified it so that it works with the loop. A problem at the moment is with the /tellraw command. Whenever a signal is inputted to the command block with the /tellraw command, only a question mark(?) is outputted to the chat. I am using the correct names and such, so that isn't the problem.
This will show the objective of Money of the player viewing it
I was not aware of the existence of the ability to use the asterisk(*) to display the owner of the objective. Thank you for the help, but now I must revert everything back to its original state.
Lol thanks for that. I remembered that there was some way to do that when I first read this thread, but I couldn't remember it so I assumed there wasn't
However, the problem comes with who's the owner of the score. In this case, it is I. The command won't display the player's own score who is playing the map. I have realized that along with the new /tellraw display, you can now have global names. Example:
We would use this:
Instead of this:
Used in /tellraw:
This would be the obvious solution, to use a global name instead of a regular player name. However, this comes with a consequence. You cannot use the player parameters with global names, such as anything imputed in the player parameters will act as part of the name, not a filter. For example:
The command will create a global name with the name "@a[name=#PlayerMoney,score_Money_min=2]" to a score of 5. No matter the score, the global 'player' is still created and change when it should only change if the score is higher than 2. Now, here is my question to you. Do you happen to know of a workaround this system, to tell the current player's score using the /tellraw command and be able to use the parameters at the same time? Perhaps we would need to use both a global and a current name (of the current player).
I suppose I can; however, the whole setup is in a clock. It needs to activate every 2 ticks or so. Surely, it works when you set the score to five, but when you add a score of one it only activates once as it has a constant comparator signal.
That is very smart. For the moment, I used the /scoreboard test command and modified it so that it works with the loop. A problem at the moment is with the /tellraw command. Whenever a signal is inputted to the command block with the /tellraw command, only a question mark(?) is outputted to the chat. I am using the correct names and such, so that isn't the problem.
This will show the objective of Money of the player viewing it
I was not aware of the existence of the ability to use the asterisk(*) to display the owner of the objective. Thank you for the help, but now I must revert everything back to its original state.