Last Area Skript

  • 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 community!

    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.
you should learn maybe more about variables.

code_language.skript:
set {var} to stuff

this is how variables setup

so to your fix, just change the {var} with player's loaction
 
you should learn maybe more about variables.

code_language.skript:
set {var} to stuff

this is how variables setup

so to your fix, just change the {var} with player's loaction
So if I understand you correctly I should do this?
On Region Enter:
set {LocalPosition.%player%} to player's location
On Quit:
set player's location to {LocalPosition.%player%}

I am still getting an error
error7.PNG
 
So if I understand you correctly I should do this?
On Region Enter:
set {LocalPosition.%player%} to player's location
On Quit:
set player's location to {LocalPosition.%player%}

I am still getting an errorView attachment 1120
you need to format that second line as you did the first
You set the variable, not the location.
code_language.skript:
set {variable} to player's location
Then use the on join event to teleport them to that location. you can't tp a player who is not there, so the on quit event will not work for that.
 
  • Like
Reactions: wesnoah3
you need to format that second line as you did the first
You set the variable, not the location.
code_language.skript:
set {variable} to player's location
Then use the on join event to teleport them to that location. you can't tp a player who is not there, so the on quit event will not work for that.
you should learn maybe more about variables.

code_language.skript:
set {var} to stuff

this is how variables setup

so to your fix, just change the {var} with player's loaction
Oh, ok, thank you very much. I have one though, is there any way to make it so if the player leaves the server then comes back it teleports them to a pre-set location depending on the region they last entered. Like for example they enter region "test" and then a little later they logoff, is it possible to do something like
On Region Enter:
if "%region%" is "test in world world":
set {LocalPosition.%player%} to (pre-set coords or warp)
 
Oh, ok, thank you very much. I have one though, is there any way to make it so if the player leaves the server then comes back it teleports them to a pre-set location depending on the region they last entered. Like for example they enter region "test" and then a little later they logoff, is it possible to do something like
On Region Enter:
if "%region%" is "test in world world":
set {LocalPosition.%player%} to (pre-set coords or warp)
You could make those "pre-set" locations the same way you set it with the on enter, only with a command. Then on quit if their region is "such and such region in world world" set the {LocalPosition.%player%} to the preset variable. So potentially something like this:
code_language.skript:
command /setregion:
    trigger:
        set {preset-region-location} to player's current location}

on quit:
    if "%region%" is "test in world world":
        set {LocalPosition.%player%} to "%{preset-region-location}%"
I'm not sure if this syntax will work perfectly I'm unable to test. You may have to play around with the wording. the expression %region% may also be confined only to on region enter/leave events
 
You could make those "pre-set" locations the same way you set it with the on enter, only with a command. Then on quit if their region is "such and such region in world world" set the {LocalPosition.%player%} to the preset variable. So potentially something like this:
code_language.skript:
command /setregion:
    trigger:
        set {preset-region-location} to player's current location}

on quit:
    if "%region%" is "test in world world":
        set {LocalPosition.%player%} to "%{preset-region-location}%"
I'm not sure if this syntax will work perfectly I'm unable to test. You may have to play around with the wording. the expression %region% may also be confined only to on region enter/leave events
I tried but got this error
error8.PNG
 
In line 9 you're setting setting {LocalPostion.%player%} to {preset-region-location} as a text not a location since you have quotes and percents around it. Remove them and it should work.
 
i think you need add wait a ticks between on region enter, and set...
 
i think you need add wait a ticks between on region enter, and set...
Still not working, just teleports me when I join to the postion a little after i entered the region
[doublepost=1503512764,1503417484][/doublepost]Bump
[doublepost=1503603859][/doublepost]Bump
 
you can debug stuff yourself. broadcast variables and stuff at different spots and make sure everything is correct like the region name
 
Status
Not open for further replies.