1
Unique Player Scores with /scoreboard [SOLVED]
Basically, I'm trying to creating a unique player score with the /scoreboard command (which I assume is something you can do?). The score would be something like: (the player's current xp amount ÷ their death count) + the number of diamonds they have acquired.
I know you'd need to do something with dummy scoreboard adjectives and the /scoreboard players operation command, but I'm kind of a n00b when it comes to scoreboards, so I can't figure it out :(
Any suggestions?
I know you'd need to do something with dummy scoreboard adjectives and the /scoreboard players operation command, but I'm kind of a n00b when it comes to scoreboards, so I can't figure it out :(
Any suggestions?
2
There are sort of two ways to go about this. If every action you want to perform comes from a score that you would manually set yourself(for example the players xp count is not something that counts as a scoreboard type so you would have to set that manually [scoreboard types being things like dummy or death count]). If this is the case than you can simply set up two scoreboards, both dummies. On one you would have a "fake" player for every action that you want to count towards the final score. "Fake" players are just essentially names that you've added to the scoreboard that aren't actually players in the game, which you can simply do by adding them to the scoreboard like you would any normal player ( /scoreboard players add [fakePlayerName] [scoreboard] 1). For now, I'm not going to get into how you would actually add scores like xp counts because that doesn't seem to be what you're looking for. Anyway, I would then use the operation command to change the score of the players score on that second dummy scoreboard you created. This would be done with /scoreboard players operation [playerName] [secondScoreboardName] [operation] ["fake"PlayerName] [firstScoreboardName].
And I think that's basically it. You would perform the desired action with the desired score and it would add to the players existing score. You could set them up the run in a specific order by simply making a repeating command block and some chains attached to it. If you want some more complex operations you'll have to figure out a way to make do with the options available. If you need any more help feel free to DM me.
List of Options for [operation
]%= This takes the modulus of the first players score by the second players score and sets the first players score to that value. Modulus is essentially division but it returns the remainder (10 % 2 = 0, 10 % 6 = 4, etc.)
*= This multiplies the first players score by the second players score and sets the first players score to this value.
+= This adds the first players score to the second players score and then sets the first players score to this value
-= This subtracts the first players score from the second players score and then sets the first players score to this value
/= This divides the first players score by the second players score and then sets the firs players score to this value. Note that since all scoreboard values are ints rounding is applicable (10 / 3 = 3 NOT 3.3, 10 / 6 = 1 NOT 1.6 or 2)
= makes the two scores equal
I haven't been able to really figure out how < > >< work just yet so don't worry about those.
And I think that's basically it. You would perform the desired action with the desired score and it would add to the players existing score. You could set them up the run in a specific order by simply making a repeating command block and some chains attached to it. If you want some more complex operations you'll have to figure out a way to make do with the options available. If you need any more help feel free to DM me.
Thanks!!! This really helped!!! :)
