RMMZ - Events with two roles

Hi everyone !

Is there a way to create events that can be activated by two different things, have two different roles ?

What I mean is, I'm trying to create an NPC that will :

- Move across the map as they react to different switches. The main character will, for exemple, walk into a room, activating a switch, and the NPC will follow and position themselves inside said room.

- Have a whole dialogue tree when directly activated by the main character.

I can't see a way to make that work yet, any ideas ?
Hi everyone !

Is there a way to create events that can be activated by two different things, have two different roles ?

What I mean is, I'm trying to create an NPC that will :

- Move across the map as they react to different switches. The main character will, for exemple, walk into a room, activating a switch, and the NPC will follow and position themselves inside said room.

- Have a whole dialogue tree when directly activated by the main character.

I can't see a way to make that work yet, any ideas ?
yes, use a parallel process event to move the npc when the switch is activated, and have all the dialogue in the main NPC event.

when using the move route command you can pick which event is moved, not just the one its called from.

event1 npc with dialouge
event2 parallel event with move route that controls event1 when x switch is on.
Ah, I should have known that. Thank you !
there are other ways to do the same - you don't automatically have to use a parallel process (which would add to lag if done even slightly wrong).
for example you could switch between two pages with different autonomous movement, or have the NPC changed position by the other events instead of controlling switches and a few more.

but each way has its own disadvantages (like the one above has the disadvantage of adding to lag), and it depends on the context which way would be the best. And you didn't give enough of that context to make that decision for you.
yes, use a parallel process event to move the npc when the switch is activated
For this situation, I would not do this...

you don't automatically have to use a parallel process...have the NPC changed position by the other events instead of controlling switches and a few more.
I would do this. Simply make the "switch" event move the "NPC" event when you activate it.
For this situation, I would not do this...


I would do this. Simply make the "switch" event move the "NPC" event when you activate it.
I was thinking more of a controller event, so if you want the npc to go to bed, wake up, and do other stuff. This way even when the event is moving you can walk up to it and still interact.
The way you're talking you can't talk to the event as its moving because it in the same event.

unless there's a script that lets the custom move route change based on a switch.

as for lag, after the event is moved you can turn off the switch, and use multiple event pages on the controller event to switch to the different move state ex( pg1 go to bed turn off the switch once at the bed. , pg 2 go to the living room and turn off the switch once in the living room.

You also switch the NPC event pages based on location. in bed, they will be fixed and say zzz.
In the living room, they will say something else and move at random.

then it's up to you to decide then the event move and where to by turning on a switch, if all switches if off the event stay where it is. NO LAG... well some but not as much as if you keep the event running on parallel constantly

Original thread: https://forums.rpgmakerweb.com/threads/rmmz-events-with-two-roles.152358/