So, at the moment, we can only specify a range in the selector that determines what value a player should have. This is useful when we need to verify that a certain number of points has been reached, but we don’t have a convenient way to sort players globally.
We could do this using multiple scoreboards and some math, but that’s a rather labor-intensive approach.
I think it would be very convenient if we could easily sort entities by selecting, for example, the entity with the highest score or the lowest.
Here’s my idea:
Select the entity with the highest score using ^ and a number, for example: @a[scores={random_score=^1}], which selects the player with the highest score. Meanwhile, second and third place could be obtained as ^2 and ^3, i.e., @a[scores={random_score=^2}] and @a[scores={random_score=^3}].
Similarly, you could select the entity with the lowest score using * and a number, for example: @a[scores={random_score=*1}], which selects the player with the lowest score. And by analogy with *2 and *3, such as @a[scores={random_score=*2}] and @a[scores={random_score=*3}].
In addition to this, it would be nice to have the ability to invert the selector, for example: @a[scores={random_score=!^1}], which would return all entities in the scoreboard except the entity with the highest score.
But, to be honest, I still have a slight feeling that something is missing.
Please sign in to leave a comment.
0 Comments