#How to check whether the player is in a certain coordinate space

5 messages · Page 1 of 1 (latest)

pure oyster
#

I want to check if the player is in a I want to check if the player is in a certain coordinate space, can this be done?

hexed kilnBOT
#

Once your question has been answered, please close this post with </resolve:1050379261372006400> command!

native obsidian
#

e.player.x and the same for Y and Z

stone mortar
#

specifically,

onEvent('player.tick', event=>{
  const p = event.player
  if(p.x>0 && p.x <100 && p.y > 40 && p.y < 100 && p.z >-100 & p.z <0){
    //do stuff here
    player.tell("you are in the splash zone")
  }
})
pure oyster
#

Thank you!