Dynamic Teleport

I want to allow the player to teleport whenever they desire, as in, regardless of what exact square of the map they are on. I also want them to be able to switch between worlds, just like channels of a TV, back and forth and again, landing on the exact same position they were in initially. It's mainly because i want to give the illusion of switching between states of mind. The map layouts of the worlds will be exactly the same shape and size to give the illusion of being on the same map but in a different state, one that looks completely different style wise.

Obviously the way I thought of doing this is to simply make a teleport script on every possible walkable square and when the player presses a number, they can "switch". But that would make everything overloaded with events. Is there an easier way to do it? Some way of making only one teleporting event sense the coordinates the sprite is on?

I hope it's easy to understand what I mean.
I implemented something like that before, but I had it tied to an item to activate the Common Event that did it. Let me see if I can find that project and look up how I did it again...
If nobody comments after this before I find it I'll post in a new comment, otherwise I'll edit this one in which case you won't get notified so check back later.
An item activating it would be perfect because that is indeed something I want to do. The more complicated part is making the sprite land on the exact same coordinates regardless of when the player decides to teleport. I want it to work sort of like the game Eversion where the game changes it's visuals in the exact same place. I want to give the illusion that it's not actual teleportation but a state change.

I'll await your method!
You mean at the same coordinates but different map from where they used the teleport, right?

The way I would do it is as follows:
For the Common Event that controls it you would want to...
First, take 3 variables that aren't being used elsewhere and name them "Map ID", "Map X" and "Map Y" so you can easily remember which is which then...

Control Variable > Map ID > Set > Game Data > Map ID
Control Variable > Map X > Set > Game Data > Character > Player > Map X
Control Variable > Map Y > Set > Game Data > Character > Player > Map Y
Conditional Branch > Variable > Map ID is > Equal to > Constant > (whatever the map's actual ID is, leave out the leading zeros, for example the map ID 006 would be 6, not 006 and 016 would just be 16)
Control Variable > Map ID > Set > Constant > (whatever the map ID for counterpart map to the one they are on is, again leave out the leading zeros)
Transfer Player > Designate with Variables > Map ID > Map ID(the variable you named that earlier) > Map X > Map X(the variable you named that earlier) > Map Y > Map Y(the variable you named that earlier)
This part here will need to be repeated with the different possible map ID's plugged in and set them in the "Else" category of the previous one, that way when it finds that the Map ID doesn't match the one it will go on to check the next until it finds one it matches and go from there. Remember though, you need to make sure each map has its own so it will be able to send the player either way.:

Conditional Branch > Variable > Map ID is > Equal to > Constant > (whatever the map's actual ID is, leave out the leading zeros)
Control Variable > Map ID > Set > Constant > (whatever the map ID for counterpart map to the one they are on is, again leave out the leading zeros)
Transfer Player > Designate with Variables > Map ID > Map ID(the variable you named that earlier) > Map X > Map X(the variable you named that earlier) > Map Y > Map Y(the variable you named that earlier)
To find the Map ID for setting the constants simply right click on a map name in the list and check "Map Properties", the title bar at the top will list it next to the map's name.

After the Common Event is set up just make an item, set it to NOT consume(UNLESS you want the player to need to acquire a new one each time anyway), give it a name and description to match whatever you want and set its effects to:

Other > Common Event > Teleport(or whatever it was that you named the common event we just set up)
By the way, I had remembered wrong, in my project I had it set to a skill, not an item. 😛

Original thread: https://forums.rpgmakerweb.com/threads/dynamic-teleport.55040/