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.

skript world variables

Discussion in 'Skript' started by dudle, Jun 11, 2019.

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

    dudle Active Member

    Joined:
    Jan 31, 2017
    Messages:
    135
    Likes Received:
    0
    Is there a way to make location variables (which are set in a specific world) be saved and not reset if the world where the variable was set is unloaded or is removed?
     
  2. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    108
    Medals:
    You can make 2 seperate variables: 1 with a vector with the x, y and z coordinate of the location. Another variable with the world, but as a string. Then you can use the location at expression to get the location whenever you need it
     
  3. safi009

    safi009 Member

    Joined:
    Jun 11, 2019
    Messages:
    1
    Likes Received:
    0
    Code (Text):
    1. command /setpos [<integer>]:
    2.     trigger:
    3.         if arg 1 is 1:
    4.             set {pos1} to location of player
    5.             stop
    6.         if arg 1 is 2:
    7.             set {pos2} to location of player
    8.             stop
    9.  
    10. command /tppos [<integer>]:
    11.     trigger:
    12.         if arg 1 is 1:
    13.             teleport player to {pos1}
    14.             stop
    15.         if arg 1 is 2:
    16.             teleport player to {pos2}
    17.             stop
     
  4. dudle

    dudle Active Member

    Joined:
    Jan 31, 2017
    Messages:
    135
    Likes Received:
    0
    thanks, i'll try that

    this won't really solve it I'm afraid because i use world names in the variables, but thank you anyways
     
Thread Status:
Not open for further replies.

Share This Page

Loading...