Leaving Map Edge triggers transition?

Hi, I'm very new to this whole program, so I'll probably be around here quite a bit while trying to perfect my craft.

Anyway I have a fairly simple thing I want to do but to the best of my knowledge there's no way to do it simply.

Basically I have an exterior map, let's say it's a town, and I want it where if you leave the map from any edge it transitions you back to the world map. The whole edge of the town is free to walk on, there's no obstructions or walls to keep the player from walking there.

So basically instead of a single transition point I want an entire edge of the map to act as a transition. Is this possible or would I literally need to create a transition point for every single edge tile? Would that many events on one map cause any issues?
You would need to put one on each tile you want a transition on. They're all triggered separately so there should be no lag issues. 
With the base program you'd basically need to create them each seperate from each other, but since they do not trigger concurrently you won't have issue with them. There is a script by Tsukihime that allows you to add new triggers for events, one of which is by region id, so you could create one event, tie it to a region and then just line your map with said region and it would work for that.

http://himeworks.wordpress.com/2013/04/05/custom-event-triggers/
This could be done a couple different ways. The one that comes to mind right away involve a parallel process event:

  • Set the player's X and Y to two variables. (Control Variables -> Game Data -> Character -> Player -> Map X/Map Y)
  • Use conditional branches to see if the X or Y coordinate is equal to an "edge" value. (You can see the x and y values of a tile by clicking on it on the map in the editor. It will show in the lower right corner.)
  • Teleport the player if the above conditional is true.
  • It might be a good idea to put a short wait at the end of the parallel process (30 frames?) to reduce how often it's checking since there's no need for it to check every single frame.
This could be done a couple different ways. The one that comes to mind right away involve a parallel process event:

  • Set the player's X and Y to two variables. (Control Variables -> Game Data -> Character -> Player -> Map X/Map Y)
  • Use conditional branches to see if the X or Y coordinate is equal to an "edge" value. (You can see the x and y values of a tile by clicking on it on the map in the editor. It will show in the lower right corner.)
  • Teleport the player if the above conditional is true.
  • It might be a good idea to put a short wait at the end of the parallel process (30 frames?) to reduce how often it's checking since there's no need for it to check every single frame.
Checking the X/Y coordinate would need too many conditional branches since you would need one for every leaving spot of the town. Instead I would suggest using a region id and check if the player is standing on it. It's faster to "draw" a region id everywhere the player can leave the town and enter the world map. The settings would be the same as yours but checking the region id.
Checking the X/Y coordinate would need too many conditional branches since you would need one for every leaving spot of the town. Instead I would suggest using a region id and check if the player is standing on it. It's faster to "draw" a region id everywhere the player can leave the town and enter the world map. The settings would be the same as yours but checking the region id.
No? It would be four conditionals? If the map was 20x20, it would be:


-if x == 0


teleport and erase event


-if x == 19


teleport and erase event


-if y == 0


teleport and erase event


-if y == 19


teleport and erase event.


You don't need to check every spot, just if the player is in an edge row or column.


I mean, sure, region ID is an option as well, but it's not the only option.
Thank you everyone for your quick responses, looks like I have several options to play around with to do this, a bit of a shame there wasn't an option like this included in the map properties (similar to the looping option). Still at least it is possible.

I haven't quite figured out which one I'll use or even if I'll use any (I'm still playing around with maps, not really finalizing any for a project so I may not end up using open borders) but the script that allows region triggers looks the most promising as I can see getting other uses out of that besides simple zone transitions.
You could always narrow down the edge of the map to a 1 or 2 tile exit, so then you would only need 1 or 2 transfer events.
I personally suggest Racheal's method... I do it myself when I need more than a few tiles of transition points... though well, region ID sure is another option... especially if you want to somehow make a non-linear edge, though you need to check it via script calls since I don't see any default event command for getting Region ID...
No? It would be four conditionals? If the map was 20x20, it would be:

-if x == 0

teleport and erase event

-if x == 19

teleport and erase event

-if y == 0

teleport and erase event

-if y == 19

teleport and erase event.

You don't need to check every spot, just if the player is in an edge row or column.

I mean, sure, region ID is an option as well, but it's not the only option.
That would only work if something like I'm gonna show would never happen:

ozeeF8e.png


On the left side of the house it's possible to walk, but if for example the path below that little hill would lead to the world map by checking "if player x = 0 then teleport to world map", then that would mean staying on the far left of the little house would teleport you too but that's not what you would want to happen. For things like this using a region id check is safer.
Again, it is situational. In the case of the OP, it was clearly stated that "any edge" would transition you to the world map. It is not something would work for any map, but it also does not involve painting edges. It is all up to the preferences and needs of the user.


But aozgolo has some suggestions and is free to pick what they think will work best.
Thank you again, I do see how checking the x/y coords could be conditional, but in this case I think it would work fine. Here is the exterior map (WIP 20x20):

ext.jpg

where when you leave from any of the 4 edges you are transported to just outside the tile on the world map here:

over.jpg

My main concern was not having to make 80 event triggers just for this purpose (well techinically 76 not counting corners but still...)
Hi, I'm very new to this whole program, so I'll probably be around here quite a bit while trying to perfect my craft.

Anyway I have a fairly simple thing I want to do but to the best of my knowledge there's no way to do it simply.

Basically I have an exterior map, let's say it's a town, and I want it where if you leave the map from any edge it transitions you back to the world map. The whole edge of the town is free to walk on, there's no obstructions or walls to keep the player from walking there.

So basically instead of a single transition point I want an entire edge of the map to act as a transition. Is this possible or would I literally need to create a transition point for every single edge tile? Would that many events on one map cause any issues?
Similar to what others have said, I would just use a parallel process that keeps track of the player's coordinates on the map.  It's fairly simple to do and doesn't require a branch for each tile since you can use greater than and less than conditions.

For example:

Let's say you have a map like this (see screenshot1) and you want the player to transition north when entering the blackened areas.  A parallel process event linked to the map (see screenshot2) like this would work.  As a reference, the coordinates of the highlighted tile in screenshot1 is 050,031.

Screenshot1.png

Screenshot2.png

Original thread: https://forums.rpgmakerweb.com/threads/leaving-map-edge-triggers-transition.21741/