Transfer player to another map with autorun event then return back

Hello all,

I found this post on something that is very similar or the same to what I'm trying to accomplish. I've followed the instructions, but I'm obviously doing something wrong, or missing something.

https://forums.rpgmakerweb.com/inde...back-to-the-same-location-in-world-map.76864/

What I want to do is when the player rests at an inn, or their own bed, etc. it will transfer the player to another map called "Sleep Sceen" where I have a little autorun event that tints the screen to night, hides the player/party, plays the resting music, has a little parallel process of a npc cat sleeping for the duration of the song(it's something silly and cute for the girlfriend).

I had the whole thing working out until I realized that it only works because I'm always sending myself back to the players bed where I started, but, what happens if I'm at any inn I created? It will send me back to the players bed again after the event runs on the "Sleep Screen".

I assume this is where a common event and that conditional branch will come into play, where any inn keeper, or the player bed will all run this same common event that transfers the player to this "Sleep Screen" to play my autorun event. What I want to happen is after the autorun finishes it transfers the player back to where the were, be it at an inn somewhere, or the players bed.

I can attach any screenshots if you like. Thanks for the help!
sounds like you just need to use a variable to store the current map of the player, another 2 variables to store the X and the Y location of the player, and then use a transfer player using variable designation.

store these values to the variables before you transfer to the sleep map and you should be all set :LZYcool:

Control variables -> Game Data -> Other -> Map ID
Control variables -> Game Data -> Character -> Map X
Control Variables -> Game Data -> Character -> Map Y

use those variables in your sleep map transfer event to go back to the last location you slept at

On sleep map -> Transfer Player -> Designation with Variable -> Map Variable, Map X Variable, Map Y Variable :mrsatan:
Thanks Ritter, the missing piece was the sleep map transfer back. Even with all of that conditional branch stuff, I could get to the sleep map, and not back, but it working now.

I still left the control variables all in one common event without the conditional branch. Instead the inns, etc. just call that common event to store the variables, then transfers the player to the sleep map, then after the autorun plays it transfers the player back to those variables. It was a lot simpler then the conditional branch setup!

Thanks again.

*edit* I realize I described doing exactly what you said I should do, but seeing you describe how to do it that way just allowed everything to make sense and "click" in my head about what I was doing wrong and missing. So really, thanks. I've been sitting here for over an hour trying to sort it out to myself what I was missing. Lol

Original thread: https://forums.rpgmakerweb.com/threads/transfer-player-to-another-map-with-autorun-event-then-return-back.121667/