RPGMAKER MZ SWAPPING EVENTS

Okay, so I'm honesty stumped on why my game is deciding to break right now. For a intro scene I am trying to swap out two versions of the same character, one with a sprite when he's asleep, and one with a sprite when hes awake. But for some odd reason when i call the variables for them to swap they simply don't or the sleeping on starts flickering.

Attached below is the common event that activates upon the npc being clicked on and then turns on the variable "Unlock Him' which im using as a mark to tell the game to make the swap of the events using the event that says transferevent which should automatically activate the transfer. I have it set up with both events here: the intro and real creation, to switch tabs depending on what is activated (Which was a pain itself since i had issues with the events popping up at all)

Ive tried doing it all in the common events, i tried doing it all within one of the events and i even tried to buy a plugin to use custom sprites and i couldn't figure out how to make the game not to try and put down multiple sprites for one npc just because the sprites themselves were bigger than the usual size! I did not want to go on here cause i often feel like maybe errors like these are all on me and how i set it up and how i made it since for a moment my game completely fell apart because of this. But ive been spending days trying to figure out something, watching videos, and I just ge frustrated. What do yall think I've done wrong? What am I missing?
I don't really get what you use common event for this, and event echanging, but problem I see is that the second page has no condition, while the first page has condition "Unlock Him >= 1", because of how RPG Makers works, the second page will alwyas be on, because it's the last page and has no condition.

Or are these separate events? I don't know, because you posted page 1 of "RealCreation" and second page of "IntroCreation" ????
I mean why are we running the transfer event as a parallel 60 times per second? Why are we swapping events for what looks like a simple sprite change? Plus what fizzly said.
I mean why are we running the transfer event as a parallel 60 times per second? Why are we swapping events for what looks like a simple sprite change?
I don't really get what you use common event for this, and event echanging, but problem I see is that the second page has no condition, while the first page has condition "Unlock Him >= 1", because of how RPG Makers works, the second page will alwyas be on, because it's the last page and has no condition.

Or are these separate events? I don't know, because you posted page 1 of "RealCreation" and second page of "IntroCreation" ????
Well, Mainly to organize my dialogue trees once I'm able to make them, with one of my other projects i struggled alot mainly because there were just CLUMPS of writing that I couldn't properly navigate so I thought "Well why not use the common events as a way to keep things less messy and malleable for the future, Since I do have plans on making the intro scene usable for more than one character.

I did take the advice on the transfer event and that did stop the flickering, And yes they are two seperate events, I didn't think to post the first or second of the others ones because they are completely empty and are only there for when the event is no longer needed. also the reason behind the event difference in general is because i tried doing it in one event and it refused to work, it only looped back to the intro
@Cold
As you probably realised from the posts above, you made the events needlessly complex and ignored several basic rules of eventing.

To help you understand your mistakes I'll list and explain them here.

1) Page priority
I usually phrase this as "highest page number = highest priority"
when multiple pages have their conditions true (or no conditions at all) then the one with the highest page number will be active and all others ignored,
Due to this only the first page should have no condition and all conditions should be on higher pages - because no page lower than the one without conditions will ever be processed.

2) one controlling event per cutscene
every single command of a cutscene should be in one event, with all other events being empty placeholders.
Only this way do you have any real control on the timing, chaining events often results in timing problems.
And if every text of a cutscene is in one event only, it is much easier to keep track of the story...

3) sprite changes
if a placeholder event needs different sprites, either switch between different pages of the event (all empty of commands) or use the change graphis command in the move route that targets this event from the controlling event.
Multiple switched pages are better if all sprites are used for some time, the move route command is better for short animations that are switched back soon.

4) autorun and parallel loop automatically
both autorun trigger and parallel trigger automatically loop back to the start after completing themselves, sixty times a second. that can cause lag or flickering if it is not carefully controlled.
depending on what exactly you want to achieve, the solution is either erase event, switch page or the wait command - but that entire block is too much to explain in a post like this.
just keep those three options in mind and remember that they have different purposes and are NOT interchangable between themselves.
@Cold
As you probably realised from the posts above, you made the events needlessly complex and ignored several basic rules of eventing.

To help you understand your mistakes I'll list and explain them here.

1) Page priority
I usually phrase this as "highest page number = highest priority"
when multiple pages have their conditions true (or no conditions at all) then the one with the highest page number will be active and all others ignored,
Due to this only the first page should have no condition and all conditions should be on higher pages - because no page lower than the one without conditions will ever be processed.

2) one controlling event per cutscene
every single command of a cutscene should be in one event, with all other events being empty placeholders.
Only this way do you have any real control on the timing, chaining events often results in timing problems.
And if every text of a cutscene is in one event only, it is much easier to keep track of the story...

3) sprite changes
if a placeholder event needs different sprites, either switch between different pages of the event (all empty of commands) or use the change graphis command in the move route that targets this event from the controlling event.
Multiple switched pages are better if all sprites are used for some time, the move route command is better for short animations that are switched back soon.

4) autorun and parallel loop automatically
both autorun trigger and parallel trigger automatically loop back to the start after completing themselves, sixty times a second. that can cause lag or flickering if it is not carefully controlled.
depending on what exactly you want to achieve, the solution is either erase event, switch page or the wait command - but that entire block is too much to explain in a post like this.
just keep those three options in mind and remember that they have different purposes and are NOT interchangable between themselves.
THANK YOU ACTUALLY, see I had to take a break from programming so I'm not exactly as familiar with it as I was about 2 weeks ago, I'm still trying to have a good grasp on the program so I truly appreciate the guide. I'm not exactly the sharpest tool in the shed with these things but I finally see where I was going wrong with my "temporary fixes" lol. Thank you again!

Original thread: https://forums.rpgmakerweb.com/threads/rpgmaker-mz-swapping-events.182601/