[SOLVED] Help with fade in/fade out when returning to map

Status
Not open for further replies.

lodger

Villager
Member
Joined
Dec 8, 2019
Messages
14
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hi all,

Here's the gameplay scenario.

There are two playable characters. When you sleep in a bed, you wake up on a different map, as a different character.

So, I have a fade in set up on my initial map like so:

Screen Shot 2020-01-17 at 7.36.42 PM.png
Screen Shot 2020-01-17 at 7.36.48 PM.png

Then, the character can choose to go back to sleep. If they do, the screen fades out and loads another map, where you play as the second character. That event looks like this:

Screen Shot 2020-01-17 at 7.45.56 PM.png
On this map, you can go back to sleep as well, and wake back up as the first character, on the first map.

The going to sleep/map transfer from the second map back to the first looks like this:

Screen Shot 2020-01-17 at 7.37.30 PM.png


The problem is, when I fade out on the second map and return to the first map, the fade in event doesn't occur again.

I must be doing something wrong with the switches/self-switches, but I can't figure out what it is.

Any help is appreciated.
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
286
Reaction score
104
First Language
English
Primarily Uses
RMMV
Remove self switch and don't turn those to parallels in general, instead use a switch conditional on the first and only page as a parallel that fadeins, then turns that switch off, on both those transfers turn the switch on. Though you don't even need the fadeout at all I think, just put it after the transfer, so wait 320, then transfer, then do the 3 things.
 

lodger

Villager
Member
Joined
Dec 8, 2019
Messages
14
Reaction score
2
First Language
English
Primarily Uses
RMMV
Would you mind explaining that a bit more - I'm still working through early tutorials on switches and I'm not sure I understand 100%.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,781
Reaction score
12,208
First Language
English
Primarily Uses
RMMV
Why have you even got the first event? It fades in and then does nothing. If there was no fadeout before, it's not even needed. If it's because the player got to choose a character during a fadeout then got transferred to this map, put the fadein after the transfer on the original map.

From the events you have shown, there should be no issues fading in, because you haven't run any fadeouts. The fadeout/fadein on the transfer command are automatic. If it is staying faded out after a transfer, then my guess is that you have another event that's doing it.

Also, the second page on that first event, if you actually need the event at all, should not be set to parallel process. Leave it as action button.
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
286
Reaction score
104
First Language
English
Primarily Uses
RMMV
Would you mind explaining that a bit more - I'm still working through early tutorials on switches and I'm not sure I understand 100%.
The reason it doesn't work again is because you turned on a self switch but never turn it back off, to turn off a self switch from another event you need to use a script call of
Code:
var key = [mapId, eventId, the self switch letter]
$gameSelfSwitches.setValue(key, true or false);
As said you don't even need the fades at all there though.
 

lodger

Villager
Member
Joined
Dec 8, 2019
Messages
14
Reaction score
2
First Language
English
Primarily Uses
RMMV
Why have you even got the first event? It fades in and then does nothing. If there was no fadeout before, it's not even needed. If it's because the player got to choose a character during a fadeout then got transferred to this map, put the fadein after the transfer on the original map.
There is a fade-out from a previous cutscene. From reading through some previous threads I thought I read that anything in a list that comes after a transfer doesn't work and that they should be evented on the new map, but maybe I misunderstood.

Here is what the transfer/fade out after the initial cut scene looks like. My understanding is that self-switches were needed to cancel out autoruns. Would I still keep it in this case?

Screen Shot 2020-01-17 at 8.05.02 PM.png
Screen Shot 2020-01-17 at 8.03.21 PM.png

Will apply what you've said and report back.


EDIT: That worked, I put the fade in after the transfer on the same event page. Thanks for the help everyone!
 

Attachments

Last edited:

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
286
Reaction score
104
First Language
English
Primarily Uses
RMMV
The only reason for self switches is to make the page conditions not met, they check in order of highest number to lowest, if you turn it to self switch A and the 2nd page requires it then it will never check the first page again unless turned off manually, you can also just turn a switch check for the first page to be active and turn it off with its own required switch if you want to keep using it, that or script call the self switches off with the above code. Oh and I mean reason for self switches used that way, they can be used for a lot of things other than that.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,781
Reaction score
12,208
First Language
English
Primarily Uses
RMMV
Oh, I see what's happening. I didn't look at your first screenshots closely.

So you're doing a fadeout so you can do the party change.

SOME commands will run after a transfer. Your Change Opacity, for example. I believe a fadein is another one that will run after a transfer.

The first thing I would try is removing the autorun event that does the fadein, and on each event that does a fadeout, change party, transfer, do a fadein after the transfer. See if that works.

If it doesn't, just change your fadein event from autorun to parallel process, and instead of setting a self switch, do an Erase Event command. The difference is that a self switch is permanent, and remains when you leave the map and return. But an erase event will just get rid of the event while you're on that map, but when you leave and return it will be there again.
 

lodger

Villager
Member
Joined
Dec 8, 2019
Messages
14
Reaction score
2
First Language
English
Primarily Uses
RMMV
I believe a fadein is another one that will run after a transfer.
Precisely, for some reason I had it in my head that it wouldn't run, and so I didn't even think to try it. But your above advice was correct, I simply put the fade in after the transfer and was able to avoid needing to use the autorun event on the new map at all.

Thanks again!
 

Touchfuzzy

Rantagonist
Staff member
Lead Eagle
Joined
Feb 28, 2012
Messages
6,602
Reaction score
5,647
First Language
English
Primarily Uses
RMMV

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.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Just had a stranger SPRINT away from me in the grocery store. Talk about overreaction...
...I don't think I'm that ugly! ^-^
I wonder if I can go outside ye-

Government: lemme stop you right there
Alright, who's playing Jumanji? And whose turn is it?!
*Buys all the PVGames assets, ends up creating his own ground tiles.* At least I used the other types of graphics? Right? :kaoswt:

Forum statistics

Threads
95,506
Messages
929,665
Members
125,764
Latest member
KURAMAA0
Top