How to determine if several players are standing in a certain zone



  • I'm making my map in Minecraft and making it for several players, I want to make sure that all the players on the map could execute a command in a certain place, that is, all the players who are currently in the world could start the game when they enter a certain zone.

    execute if entity @a[x=~,y=~,z=~,dx=~,dy=1,dz=~] 


  • If you want only certain players to execute "commands" in certain places, you have to use a trigger scoreboard. Then on loop you can run a similar following command to enable any players to /trigger that scoreboard.

    scoreboard players enable @a[x=100,y=80,z=100,dx=9,dy=0,dz=9] trigger_scoreboard_name
    

    This command enables a player to use the command "/trigger trigger_scoreboard_name" when they enter the bounding box of xyz(100-110, 80-81, 100-110).

    Then you have to handle what happens when a player's trigger scoreboard changes.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2