How to link two events

Hi everyone,

I need some help. Here's my situation, I would like to link two events. The first one is a fight et the second one is the apparition of an NPC. What I want is that, when the fight is over, an NPC appears somewhere on the same map.

How can I do that?

Thank you 🙂
Use switches. There's no concept of "linked" events, but you can make one event only appear when a switch is on, and a different event turns that switch on when you interact with it.
It's simple. In event, when you battle something after winning use in third tab "Script..." event and type this:
Code:
$gameSelfSwitches.setValue([this._mapId, x, "A"], true);

now, replace x with id of event you want to "link"... this is how you obtain ID of an event

And finally you set your linked event like this.
It's simple. In event, when you battle something after winning use in third tab "Script..." event and type this:
Code:
$gameSelfSwitches.setValue([this._mapId, x, "A"], true);

now, replace x with id of event you want to "link"... this is how you obtain ID of an event

And finally you set your linked event like this.
Thank you. I did what you said but the Character that is supposed to appear doesn't :/

Here are my events:
https://i.imgur.com/0dqQ8tA.png
https://i.imgur.com/dATplcw.png

(sorry my game is in French)
I also added the mapId but it still doesn't work :/
I doesn't work because you type wrong parameters. It should be:
Code:
$gameSelfSwitches.setValue([this._mapId, 9, "A"], true);

NOT ID:009 🙂
I doesn't work because you type wrong parameters. It should be:
Code:
$gameSelfSwitches.setValue([this._mapId, 9, "A"], true);

NOT ID:009 🙂

Thanks! But I found another way to do what I want using a switch 😉

Original thread: https://forums.rpgmakerweb.com/threads/how-to-link-two-events.115115/