1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Detect if the player is in a location

Discussion in 'Skript' started by _PAPER_PLANE_, Jul 29, 2022.

Thread Status:
Not open for further replies.
  1. _PAPER_PLANE_

    _PAPER_PLANE_ Member

    Joined:
    Jan 21, 2022
    Messages:
    16
    Likes Received:
    0
    (sorry my english is not good)

    I want to make a portal that teleport when the player is in a certain position
    Also, if I use every ticks will I use more computer performance?
    Do I need to use "player is in world" or something like that?

    Thanks!

     
  2. Best Answer:
    Post #6 by Jake*, Aug 4, 2022
  3. SteakBites

    SteakBites Member

    Joined:
    Jul 18, 2022
    Messages:
    14
    Likes Received:
    1
    didn't test it but i belive this should work
    Code (Text):
    1. on join:
    2.       while player is online:
    3.             while player is at location 0, 0, 0 in world "world":
    4.                   message "test"
     
  4. _PAPER_PLANE_

    _PAPER_PLANE_ Member

    Joined:
    Jan 21, 2022
    Messages:
    16
    Likes Received:
    0
  5. Jake*

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    109
    Likes Received:
    6
    Code (Text):
    1. every 5 ticks:
    2.   teleport all players where [distance between input and {_yourcustomlocation} <= 0.4] to ...
     
  6. _PAPER_PLANE_

    _PAPER_PLANE_ Member

    Joined:
    Jan 21, 2022
    Messages:
    16
    Likes Received:
    0
    Is that so? But it doesn't work.
    Sorry I don't quite understand what you mean XDD

    Code (Text):
    1. every 5 ticks:
    2.     set {_1} to location at location(-20.5, 51.5, -5.5, world "world")
    3.     teleport all players where {_1} to location(-58.5, 51.5, 0.5, world "world")
     
  7. Jake*

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    109
    Likes Received:
    6
    Code (Text):
    1. every 5 ticks:
    2.   set {_l} to ...
    3.   teleport all players where [distance between input and {_l} <= 0.4] to {_l}
     
  8. _PAPER_PLANE_

    _PAPER_PLANE_ Member

    Joined:
    Jan 21, 2022
    Messages:
    16
    Likes Received:
    0
    Oh, I understand, I am a beginner, just understand this part
    Thanks!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...