2

Pretty much it's a climbing game. The first person to reach a certain height within the game boundaries wins. It's multiplayer so there could be people outside of the game at the specific y-axis as well. I need a command that will detect a player within the radius:

/execute if entity @a[x=244,z=345,distance=..2] run...

AND check if that specific player is ALSO at an exact y-axis:

/execute if entity @a[y=70] run...

If you picture it visually, I want the detection area to be a top-down circle instead of a sphere. Once a player reaches that detection area, it will run a command. Hope you guys can help! Thanks :)

  • Is it okay if you run the command as a player? You should be able to combine your execute functions like so: execute as @a[x=244,y=345,distance=..2] at @s if entity @s[y=70] run .... If that doesn't work I'd put every player's y coord in a scoreboard every tick and do everything the same as above but instead of if entity @s use if score @s.... – Nik3141 May 08 '19 at 23:53
  • Ah, this problem again. I looked for a solution for very long and didn't find anything perfect, but a few very good approximations that are not too complicated or laggy. Linking as duplicate now. – Fabian Röling May 09 '19 at 14:35
  • Actually, there is indeed a perfect solution that I hadn't considered before! I'll change my answer over there. – Fabian Röling May 09 '19 at 14:38

0 Answers0