Transfer player to another map with autorun event then return back

Nephilium

Veteran
Veteran
Joined
Jul 14, 2015
Messages
32
Reaction score
7
Primarily Uses
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!
 
Last edited:

Ritter

Veteran
Veteran
Joined
Jan 17, 2017
Messages
64
Reaction score
30
First Language
English
Primarily Uses
RMMV
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:
 
Last edited:

Nephilium

Veteran
Veteran
Joined
Jul 14, 2015
Messages
32
Reaction score
7
Primarily Uses
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
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,836
Latest member
T62352536256t362
Top