How can I detect Players that have a certain score...
Example:
There are 3 Scores,
A, B, and C.
In A and B, there are only 1 player that has A and another one for B.
Once there are 1 player on A and B, other players will get their score to C.
How can I detect how many Players that has C?
Example:
There are 3 Scores,
A, B, and C.
In A and B, there are only 1 player that has A and another one for B.
Once there are 1 player on A and B, other players will get their score to C.
How can I detect how many Players that has C?
5
To count how many players have a certain score you can either use the /stats command (which is in this case the hardest option) or do this:
- Create a dummy objective: /scoreboard objectives add Count dummy
- Run this command (once) when you want to count how many players have a score of C: /execute @a[score_C_min=1] ~ ~ ~ /scoreboard players add Counter Count 1 (this basicly adds 1 score to a fake player for every person who has a score for C greater or equal to 1, and thus acts as a counter)
- You can test for this score with: /scoreboard players test Counter Count <minimumscore> <maximumscore> (without the "< >")
- Create a dummy objective: /scoreboard objectives add Count dummy
- Run this command (once) when you want to count how many players have a score of C: /execute @a[score_C_min=1] ~ ~ ~ /scoreboard players add Counter Count 1 (this basicly adds 1 score to a fake player for every person who has a score for C greater or equal to 1, and thus acts as a counter)
- You can test for this score with: /scoreboard players test Counter Count <minimumscore> <maximumscore> (without the "< >")
I salute you sir!
answer is there.
This is possible!
I Believe using the /stats command
However i haven't had a chance to use this yet so sorry that's all i can say
Or i guess you could do this:
So every player (except those who have a score for A/B have a score of C)
so /scoreboard players set @r[score_C_min=1] C 0
then have a comperator that comes out of that leading to a command block with this in it:
/scoreboard players test @a C 1 2
With a comperator coming out of that leading to your output
Then just count the number of pulsed you need to send it until it outputs!
Another idea is make everyone join a team then have anyone who has a score of A or B leave the team! Then use a scoreboard operation to get the number of players playing -2
IDK
drop me a pm if ytou need any help
Hope i helped
-Kungfue
I Believe using the /stats command
However i haven't had a chance to use this yet so sorry that's all i can say
Or i guess you could do this:
So every player (except those who have a score for A/B have a score of C)
so /scoreboard players set @r[score_C_min=1] C 0
then have a comperator that comes out of that leading to a command block with this in it:
/scoreboard players test @a C 1 2
With a comperator coming out of that leading to your output
Then just count the number of pulsed you need to send it until it outputs!
Another idea is make everyone join a team then have anyone who has a score of A or B leave the team! Then use a scoreboard operation to get the number of players playing -2
IDK
drop me a pm if ytou need any help
Hope i helped
-Kungfue
DudameshHow can I detect Players that have a certain score...
Example:
There are 3 Scores,
A, B, and C.
In A and B, there are only 1 player that has A and another one for B.
Once there are 1 player on A and B, other players will get their score to C.
How can I detect how many Players that has C?
bumppppp
