Question about 2 events

Hello,

I have 2 events with the same commands, but I need help to one thing.

I want in each events if player touch in one of it the other one is permanently canceled.

Is it possible? Can anyone help me ?
You could

A: use 2 switches

or

B: use 1 variable

B might be better in this case

For the switch you could make 2 pages each with a switch on the opposite page so that one event or the other can turn on both switches.

Or you could use 1 variable and do the same thing but make the var = 1 if you talk to one or the other and when it's 1 both events are off.
So isn't necessary a conditional branch, right?
One switch is enough, you make both events set the same switch to ON and have a second event page for both, each with the switch set as trigger.

Original thread: https://forums.rpgmakerweb.com/threads/question-about-2-events.24803/