Change to Exit Event Processing?

Hello, I used to use a Common Event with some conditional checks to see if the rest of the event should continue playing or not.

Essentially the event would look something like this:
Code:
Triggered Event Page -
Common Event: Can you see?
Text: "I can see."
Etc...

Can you see? Common Event Page
If: Dark && Flashlight Off
    Text: "Whoops, can't see anything."
    Exit Event Processing
End

I would use this as a kind of "return" from the entire event processing queue, so that when an event is triggered it first checks the common event. Exit Event Processing sets the interpreter's list to the very end, effectively skipping the entire event command queue, including the event that called the common event.
Even though the code for the command hasn't changed, it doesn't seem to work that way anymore. It only ends the event execution of the common event, but the event that calls it still executes the rest of the event. Using the example, the game would show "Whoops, can't see anything." and then "I can see" back to back when it used to prevent the latter half from running.
When I tried to follow what the interpreter showed for the commands in its list, it seemed to have two separate queues. One for the common event (which would jump to the end with Exit Event Processing) and the original event (which would execute in full, regardless of the common event.) I don't recall if it used to work like that when I first implemented this a while ago.

I can find another way to implement this, but I used it this way since multiple events on different maps would need to use this common event check before continuing its execution. I mostly just want to know if there's something I'm misunderstanding in the way the Game_Interpreter handles event page execution when a common event is called with it, and if there's a way to prevent ANY further commands to be executed from that initial event.
I found this in rpg_objects.js
JavaScript:
// Exit Event Processing
Game_Interpreter.prototype.command115 = function() {
    this._index = this._list.length;
    return true;
};

So it only affects current interpreter. But the common event is a "child“ interpreter of the event, so you 'll need to find its "parent".
JavaScript:
Game_Interpreter.prototype.setupChild = function(list, eventId) {
    this._childInterpreter = new Game_Interpreter(this._depth + 1);
    this._childInterpreter.setup(list, eventId);
    // save parent interpreter for later use
    this._childInterpreter._parent = this;
};

// Exit Event Processing
Game_Interpreter.prototype.command115 = function() {
  for(var p=this;p;p=p._parent){
    p._index = p._list.length;  
  }
  return true;
};

Edit* Fixed a mistake
If I get it right, you want it to cancel the rest of the common event, and continue the main event, right? Instead of the exit event, you can use a "jump to label" command, and name it like "SkipToEnd" or whatever you like. then at the end of the event make a label named "SkipToEnd". (In case you don't want to use javascript)

edit... Oh wait... utunnels reply makes me think I misunderstood the problem. You want to cancel both but it only cancels the common event, while I thought it was the other way around. 😛
I found this in rpg_objects.js
JavaScript:
// Exit Event Processing
Game_Interpreter.prototype.command115 = function() {
    this._index = this._list.length;
    return true;
};

So it only affects current interpreter. But the common event is a "child“ interpreter of the event, so you 'll need to find its "parent".
JavaScript:
Game_Interpreter.prototype.setupChild = function(list, eventId) {
    this._childInterpreter = new Game_Interpreter(this._depth + 1);
    this._childInterpreter.setup(list, eventId);
    // save parent interpreter for later use
    this._childInterpreter._parent = this;
};

// Exit Event Processing
Game_Interpreter.prototype.command115 = function() {
  for(var p=this;p;p=p._parent){
    p._index = p._list.length;
  }
  return true;
};

Edit* Fixed a mistake
Ah, looks like I overlooked the child interpreter portion. Thanks, I understand what's going on now.

I just turned it into a separate plugin command to preserve the original exit event command, but it works exactly as I intended. Thanks again

Original thread: https://forums.rpgmakerweb.com/threads/change-to-exit-event-processing.170899/