Change world save location

  • 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.

CriCer

New Member
Dec 17, 2019
7
0
0
20
Hi, I want to code that when a player leaves a world it saves the player location.

Code:
on world change:
  if past changed world is "world":
    set {%player%loc} to player location

The problem in this code is that it saves the location after you changed the world.
Is there any way to fix this?
Addons: skellet, tuske
Thanks
 
Doesn't your location save automatically when you change worlds? 99% sure that is pure vanilla
 
Probably, I'll look into it.
[doublepost=1576879900,1576879194][/doublepost]This might work

Code:
on world change:
    set {%uuid of player%loc} to player's location in "world"

Keep in mind I put %uuid of player% so that if somebody logged off, changed their name, and then logged back on, they would stay where they were.
 
Doesn't work, it says it can't understand "player's location in "world"

Thanks for the uuid advice tho :emoji_grinning:
 
Doesn't work, it says it can't understand "player's location in "world"

Thanks for the uuid advice tho :emoji_grinning:
Try replacing "player's location" with "location of player"
 
Status
Not open for further replies.