A question about closing the message window

Howdy, y'all.

I'm using Yanfly's Event Click Trigger, which makes it so you can mouse-click an event to activate it. Anyway, I have an event (let's call it "Event #1") that I can click to open a message window. Next to it is Event #2, which, when I click, will open another message window. Cool cool cool.

The problem: if the message from Event #1 is already open, then I have to click Event #2 twice; once to close the current massage window, and again to open the new message window.

What I'd like is to be able to click Event #2 and have the Event #1 message close and the Event #2 message open with a single click. I tried using this:

Code:
$gameMessage.add("\\^");

which did automatically close the current message window, but wouldn't open the new one without another click. Is there some way to close the current message window and also use that same click to perform another operation?

I realize this question may be a little convoluted and confusing, but I'm happy to try to clarify anything if you want.

Thanks!
The first event isn't finished until its message closes, it's still keeping the interpreter busy in message wait mode. The first click (anywhere on the screen) prompts the message window to start closing and (probably) isn't being counted as an event trigger. I think you'd need either:
  1. Some kind of edit, add-on, or alternative to Yanfly's Event Click Trigger plugin. This would need to check event triggers at a touched location even if the interpreter is in wait mode and start those events if appropriate.

  2. A script call to manually start event 2 after event 1's message closes, if the latest touch input coordinates correspond to event 2's location. You could use this script call to start the event (once the current one finishes):
    JavaScript:
    $gameMap.event(2).start();
    ...and something like this to check the touch input coordinates:
    JavaScript:
    var ev = $gameMap.event(2); ev.x === $gameMap.canvasToMapX(TouchInput.x) && ev.y === $gameMap.canvasToMapY(TouchInput.y)
    So you could try something like this overall, added onto the end of event 1:
    Spoiler: Event snippet
    Code:
    ◆Text:None, Window, Bottom
    :    :Test
    ◆Comment:Check if current touch input coordinates match those of event 2
    ◆If:Script:var ev = $gameMap.event(2); ev.x === $gameMap.canvasToMapX(TouchInput.x) && ev.y === $gameMap.canvasToMapY(TouchInput.y)
      ◆Comment:OK, start that event
      ◆Script:$gameMap.event(2).start();
      ◆
    :End
Option 2 is OK if you only have a few of those events, but option 1 would be much neater! 😅
Some kind of edit, add-on, or alternative to Yanfly's Event Click Trigger plugin

I went ahead and did that. I'm using Galv's Timed Message Popups, and it's working very well. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/a-question-about-closing-the-message-window.118197/