How to make universal teleport?

Guys, how to make universal teleport?
For example. There's a map we can access anywhere with some item, but when you done with the map, you can transfer back to your current position when you access the universal map with item.


Here's another example what i mean.

Player in town A, on coordinate x=210, y=160
The player access universal map with item and get teleport to that universal map.
After player done with business on that universal map, he can teleport back to his current position when he access the universal map, which is town A on coordinate x=210, y=160. (but this value is x since the charather can access the universal map from anyplace he want to)

I tried to use some event like control variabel , game data and etc
but non of them work fine with me 🙁

Please if somebody can solve the problem im really appreciate
Thanks in advance and have a nice day 😀

Edit: My bad, im forget to put my event picture.

dw9bm8.jpg


2hf03nk.jpg
Please post screenshots of your try, because control variable is the correct way to do this.
you need to store the player coordinates before teleporting to the town map with control variables, and then teleport back to those stored coordinates.
If you show us screenshots of what you've done we can tell you where you made mistakes.
Please post screenshots of your try, because control variable is the correct way to do this.
you need to store the player coordinates before teleporting to the town map with control variables, and then teleport back to those stored coordinates.
If you show us screenshots of what you've done we can tell you where you made mistakes.

My bad, im forget to put my event picture.
This is a complex eventing system. It isn't something simple and as @Andar said, we need screenshots to understand how EXACTLY your teleprting system must work.
Common Events (in the database) is a feature you MUST use though.
You ninjae'd me! 😛
This is a complex eventing system. It isn't something simple and as @Andar said, we need screenshots to understand how EXACTLY your teleprting system must work.
Common Events (in the database) is a feature you MUST use though.
You ninjae'd me! 😛
Its already done sir
hahahaha.. Thanks for the reply btw 😛
Look at the event that sets your variables again. You are setting variables 1 and 2 to the X and Y position of the player, and then you are changing them to 1. Why???

Leave the first two lines, remove the next two lines. Add another line to set a third variable to the map ID. This is also through Game Data but choose Other instead of Character.
First thing I spot is that you get values of X and Y, then discard them and set x and y to 1.
That makes no much sense to me.
Maybe you wanted to initialize those values before grabbing actual true values?

Edit: (ninjas everyhwere 😛 )
Look at the event that sets your variables again. You are setting variables 1 and 2 to the X and Y position of the player, and then you are changing them to 1. Why???

Leave the first two lines, remove the next two lines. Add another line to set a third variable to the map ID. This is also through Game Data but choose Other instead of Character.
Thx mate its working fine 🙂
I thought we need to set up the value first, that's why i setting the variables to 1 XD

First thing I spot is that you get values of X and Y, then discard them and set x and y to 1.
That makes no much sense to me.
Maybe you wanted to initialize those values before grabbing actual true values?
Edit: (ninjas everyhwere 😛 )
you got me there mate 😀
yeah i want to intilaize those value. 😛
You don't need to, but if you did need to, you would do it before setting them to the player's X and Y.

If your query is resolved, just report your first post and ask the mods to close the thread, and they'll take care of the rest 🙂

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-universal-teleport.101449/