Creating a PVP minigame on Java Edition 1.19.3. Red vs Blue. After 10 minutes the game ends. I have everything else setup and fully functioning. The only problem I am having is having the system determine which team has a higher score (more kills) than the other team to then trigger the specific title screen. Is there a better way to do this?
This is the latest version of my code:
/execute if score [team=BLUE] Kills = [team=RED] Kills run summon minecraft:arrow 14 123 -176
/execute if score [team=RED] Kills > [team=BLUE] Kills run summon minecraft:arrow 12 123 -176
/execute if score [team=BLUE] Kills > [team=RED] Kills run summon minecraft:arrow 10 123 -176
(The arrow triggers the title sequence for the specific team result)
I've tried variations of the target such as:
/execute if score BLUE Kills > RED Kills run summon minecraft:arrow 10 123 -176
There's aren't any errors showing as a result of the code so I don't understand where it is specifically incorrect.
Other things I've tried:
/execute if score #red_kills kills matches 50 run title @a title {"text":"Game Over","color":"red"}
I read both of: https://minecraft.wiki/w/Commands/execute https://www.digminecraft.com/game_commands/execute_command.php
But I still can't understand why the code doesn't function. I assume it's because of the target "BLUE/RED" and the execute command doesn't like targetting multiple entities like with:
"/execute if score @a"
"Only one entity is allowed, but the provided sector allows more than one"