Solved How to detect when a player enters a certain region

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

wesnoah3

Active Member
Aug 18, 2017
73
3
8
I am trying to create a skript that needs to detect when a player enters a certain region but I cannot find an event for this. The best that i've found is "On Region Enter", is it possible to do like "if %region% is (Region I want). Any help is apperciated
 
code_language.skript:
if "%region%" is "Your Region in world world":
the last "world" at the end defines the world the region is in. So were your region in the nether it's be
code_language.skript:
if "%region%" is "Your Region in world the_nether":
 
code_language.skript:
if "%region%" is "Your Region in world world":
the last "world" at the end defines the world the region is in. So were your region in the nether it's be
code_language.skript:
if "%region%" is "Your Region in world the_nether":
How can I use this to detect when a player enters a region named for example test. Like
On Region Enter:
If %region% is test:
 
Also have in consideration that a player can be in more than one region at a time, so using an equal comparator won't always work. Better use
regions at %Location% to get all regions, and compare them using the contains expression.
 
Last edited by a moderator:
he gave you the answer already -_- replace "your region" with the name of the region
Ah, ok, thanks

Also have in consideration that a player can be in more than one region at a time, so using an equal comparator won't always work. Better use
regions at %Location% to get all regions, and compare them using the contains expression.
How would I do this? I'm not familiar with the contains expression. Can you give me an example?
 
Status
Not open for further replies.