0

In a minigame I created, I have a scoreboard dummy objective called "Gold" and two fake players called "Team_Red" and "Team_Green" that are holding the scores for team "Red" and team "Green" respectively. I would like to create a game over title command for all players, displaying "Team ____ Won." I have a scoreboard timer set for 6 minutes and once that ends, the title will be shown displaying who won. It seems that there are no target selectors that can test for this, so how can this be done? You can't "testfor" anymore either. So how can one do this in Minecraft 1.13?

  • Does * work as the selector in this case? And if not, dummy entities always work. – Fabian Röling Dec 24 '18 at 23:18
1

execute has an if score subcommand that lets you easily compare any two scores, and run a command if the test succeeds. The following commands should work for what you want to do:

execute if score Team_Red Gold > Team_Green Gold run title @a title {"text":"Team red won!","color":"red"}
execute if score Team_Red Gold < Team_Green Gold run title @a title {"text":"Team green won!","color":"green"}
execute if score Team_Red Gold = Team_Green Gold run title @a title {"text":"It's a draw!","color":"gray"}
  • Oh! I get it now! Okay yeah I knew that there were conditions for the 'execute if' command, I didn't realize you could link and compare scores in that way. Perfect! – user212269 Dec 25 '18 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.