How do I travel to another map while the character stays at the same coordinates?

SumThinUp

Warper
Member
Joined
May 18, 2021
Messages
4
Reaction score
0
First Language
Burmese
Primarily Uses
RMMV
Hello, I plan to cycle through 4 identical maps with different color schemes. So far, I have a parallel event on each map (Spring, Summer, Autumn, Winter) that sets the map ID to a unique variable, then a conditional branch check which map the player is on, move to the next one, and assign that next one as the current map while keeping the player's current coordinates. The cycle starts on Spring, so on the starting map, I have a control variable statement that sets current map to spring.

Next, I'm using Yanfly's Button Common Events plug-in to trigger the common event and cycle to the next map. It looks to work smoothly up until that point. Here's a screencap of what I have:

CommonEventSeasons.png
*The last If statement has winter twice, my mistake.

And here are my variables:

Variables.png

However, once I press the mapped key (I'm using E at the moment, via the YEP plug-in), it takes me to a seemingly infinite black map. The vehicles are there too. Pressing the key to cycle the maps from then onward doesn't work and only reloads the black room, though the player's coordinates are kept.

BlackMap.png

The maps are all the same size, so it shouldn't be an out-of-bounds issue. I double checked the parallel events and I don't believe they interfere with each other.

I've also tried making independent conditional branches (no else statements) that check the current map, then move the player to the next seasonal map, and current map variable is updated via the parallel event on that next map. Same results, same black screen.

I'm rather stumped. Any help is greatly appreciated.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,159
Reaction score
630
First Language
English
Primarily Uses
RMMV
1) Why any parallel events? I don't understand from your description why you would need one, and you don't show them for reference.

2) The obvious question is - can you show where you set the values of your season variables? As it appears to be transferring you to a non-existent map...
 

SumThinUp

Warper
Member
Joined
May 18, 2021
Messages
4
Reaction score
0
First Language
Burmese
Primarily Uses
RMMV
1) Why any parallel events? I don't understand from your description why you would need one, and you don't show them for reference.

2) The obvious question is - can you show where you set the values of your season variables? As it appears to be transferring you to a non-existent map...
I reread the description of parallels and autoruns in the software. What I want is to define each seasonal variable by its corresponding map as soon as the game starts, but it looks like parallels only run once the event is 'present,' which I assume means that the player character has to be on the same map as the event.

To answer your second point, I have an event on each of the maps declaring the variable to equal the map ID. I noticed that I can only assign the variable to the ID of the map it's on. Picture below of the parallels.

ParallelSpring.png

ParallelSummer.png

Thanks for dropping in to help.
 
Last edited:

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
569
Reaction score
244
First Language
PT-BR
Primarily Uses
RM2k3
If the events are the same it would be better to just change the tileset when it is transferred to the map.
RM-Change_Tileset_rez.png

Just create the 4 versions of it exactly the same, but with the position of the graphics and the collision settings.
 

SumThinUp

Warper
Member
Joined
May 18, 2021
Messages
4
Reaction score
0
First Language
Burmese
Primarily Uses
RMMV
If the events are the same it would be better to just change the tileset when it is transferred to the map.

Just create the 4 versions of it exactly the same, but with the position of the graphics and the collision settings.

I intend to have a mechanic where the player can travel either back or forward in time and do quests, influence factions, etc. and that would change aspects of the world in the following season. Although changing tilesets solves the immediate issue of changing seasons, retaining events and progress might become a bigger challenge.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,159
Reaction score
630
First Language
English
Primarily Uses
RMMV
I reread the description of parallels and autoruns in the software. What I want is to define each seasonal variable by its corresponding map as soon as the game starts, but it looks like parallels only run once the event is 'present,' which I assume means that the player character has to be on the same map as the event.
You are misunderstanding events. Any event that is placed on a map will only run when that map is currently loaded, whether it is autorun, parallel, or triggered. Common events can be called from any map, and a common event set to parallel will always run when its conditions are met.

You do not want this event to run more than once in your game because it's only doing one thing and that thing is always the same. You should make it a part of an autorun event in the first map at the beginning of the game, and you set your variables for each map then. Check out an event tutorial to see how to make an autorun that runs, then at the end sets a self switch and deletes itself; then you make a blank second page with a condition of that self switch.



To answer your second point, I have an event on each of the maps declaring the variable to equal the map ID.
This is why you're experiencing your problem. You're transferring the player to a map ID contained in a variable (e.g. Summer) before that variable has been given a value. Therefore the contents of that variable are undefined, so you get sent to a non-existent part of the game as an error-catching mechanism, instead of letting the game crash. You can never use a variable that has not been given a value.

That's like telling your friend "You need to give me money to pick up your pizza," without looking up how much the pizza costs. How can they know what to give you?
I noticed that I can only assign the variable to the ID of the map it's on.

It doesn't matter that you can only set a variable to the map ID you're currently on, because you are in the game editor, you can see the map IDs right there. So in your event at the very beginning of the game, simply set Summer = 1, Spring = 2, etc. (but use whatever the correct values are). Then your common event to transfer will work fine.

As a closing tip: parallel events are for continuously doing something while the player is playing the game. If this is not what you need to do (if you want to do something while the player is unable to control the character, or if you want to do something just once), parallel is the wrong choice.
 
Last edited:

SumThinUp

Warper
Member
Joined
May 18, 2021
Messages
4
Reaction score
0
First Language
Burmese
Primarily Uses
RMMV
You are misunderstanding events. Any event that is placed on a map will only run when that map is currently loaded, whether it is autorun, parallel, or triggered. Common events can be called from any map, and a common event set to parallel will always run when its conditions are met.

You do not want this event to run more than once in your game because it's only doing one thing and that thing is always the same. You should make it a part of an autorun event in the first map at the beginning of the game, and you set your variables for each map then. Check out an event tutorial to see how to make an autorun that runs, then at the end sets a self switch and deletes itself; then you make a blank second page with a condition of that self switch.




This is why you're experiencing your problem. You're transferring the player to a map ID contained in a variable (e.g. Summer) before that variable has been given a value. Therefore the contents of that variable are undefined, so you get sent to a non-existent part of the game as an error-catching mechanism, instead of letting the game crash. You can never use a variable that has not been given a value.

That's like telling your friend "You need to give me money to pick up your pizza," without looking up how much the pizza costs. How can they know what to give you?


It doesn't matter that you can only set a variable to the map ID you're currently on, because you are in the game editor, you can see the map IDs right there. So in your event at the very beginning of the game, simply set Summer = 1, Spring = 2, etc. (but use whatever the correct values are). Then your common event to transfer will work fine.

As a closing tip: parallel events are for continuously doing something while the player is playing the game. If this is not what you need to do (if you want to do something while the player is unable to control the character, or if you want to do something just once), parallel is the wrong choice.
Works flawlessly now. Very thorough. Thank you!
 

Latest Threads

Latest Posts

Latest Profile Posts

Working on a slightly experimental horror game. It will be finished in approximately 88888888888 years.
Y'all will enjoy it though, I put lots of effort into making it stand out.

It's called Red Light and it's inspired by another obscure RPG Maker horror game, but I don't want to give too much away just yet.
Ohh man, Weapon animations plugin feels so mandatory. Seeing that same image regardless of the icon of the weapon....ugh :p
Ok so......Maaaaybe I've taken a ''little'' bit of inspiration from FF9 when it comes to battle hud xD

ff9.PNG

Just maybe....
New version of my wife's art for Tundra's opening map. No new version of Katrina yet, but I think this looks awesome.1624062754755.png

Forum statistics

Threads
112,354
Messages
1,067,706
Members
146,002
Latest member
Raytoly
Top