Solved How to check if a player is between 2 coordinates

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

FrewtyPebbles

Member
Feb 13, 2019
2
0
0
43
So as the title says essentially i am trying to make a custom region skript not using world edit or world guard, I have everything in place, all i need help with is how to check if a player is between the 2 xyz coordinates that are stored in variables every 10 seconds. I have searched the docs and other things but cant figure it out please help, thank you.

Side note: this is my first post on this site and i am relatively new to skript but not programming so please be patient with me. Thank you.
 
You have to check if the player is between each coordinate, so you have to check x, y and z separately. If it's between all of those coordinates, then they're between the locations.
 
You have to check if the player is between each coordinate, so you have to check x, y and z separately. If it's between all of those coordinates, then they're between the locations.
Thanks man ill try that
[doublepost=1550043211,1550042926][/doublepost]
You have to check if the player is between each coordinate, so you have to check x, y and z separately. If it's between all of those coordinates, then they're between the locations.
so i tried it with just the x coordinate like this and it didnt work, is the format correct? If not how would i fix it? also the {FirstArenaCoord::%loop-index%} and {SecondArenaCoord::%loop-index%} are the two coordinates:
loop {ArenaName::*}:
if player's x-coordinate is between {FirstArenaCoord::%loop-index%}'s x-coordinate and {SecondArenaCoord::%loop-index%}'s x-coordinate:

Edit: Nevermind it does work! i just tested it wrong lol thank you so much!
 
Status
Not open for further replies.