1
Hard commandblock problem
Is it possible to hardcode commandblocks testing for certain scores?
The scenario is that I've made a scoreboard named Blue for blue team and red for red team instead of having all individual playernames in the sidebar. Now testfor if team red have a certain amount of points, say 100. Usually it's just /testfor @a[team=red,score_red_min=100] to test for a player in redteam with 100 or more.
But now I want to testfor "red"s amount of points and since "red" is not an online player @p/@a does not work. Is there a way to hardcode the name "red" into the commandblock and get what I'm trying to do work?
The scenario is that I've made a scoreboard named Blue for blue team and red for red team instead of having all individual playernames in the sidebar. Now testfor if team red have a certain amount of points, say 100. Usually it's just /testfor @a[team=red,score_red_min=100] to test for a player in redteam with 100 or more.
But now I want to testfor "red"s amount of points and since "red" is not an online player @p/@a does not work. Is there a way to hardcode the name "red" into the commandblock and get what I'm trying to do work?
1
Shouldn't be too hard. assuming you are using a dummy objective type for your player balance, you could just update another dummy type objective when ever the individual player score is incremented. then you can just test on that value.
e.g.
player from blue team scores, executes 2 command blocks,
1 to increment player score objective.
1 to increment blue-team score objective. (which was preceeded by a testfor to check the player is on blue team)
then you just need to query the blue team score for @a
e.g.
player from blue team scores, executes 2 command blocks,
1 to increment player score objective.
1 to increment blue-team score objective. (which was preceeded by a testfor to check the player is on blue team)
then you just need to query the blue team score for @a
