MZ Need help with figuring out wait times in plugin

I'm trying to figure out how to implement a frame wait in a bit of code and struggling to get it to function the way I want. Specifically, I'm trying to modify CGMZ's Fast Travel plugin to play a common event prior to transferring the player (essentially a teleportation animation I made) but I can't figure out why it's not working and wanted to ask for help.

By default, the code is:
JavaScript:
$gamePlayer.reserveTransfer(fastTravel._mapId, fastTravel._x, fastTravel._y, fastTravel._dir, 0);
SceneManager.goto(Scene_Map);

I've modified to to be:
JavaScript:
$gameMap._interpreter.command117([15]); //also tried $gameTemp.reserveCommonEvent(15); with same result
$gameMap._interpreter.setWaitMode('route'); //common event triggers a movement route, set wait mode accordingly
$gameMap._interpreter.wait(65);
$gamePlayer.reserveTransfer(fastTravel._mapId, fastTravel._x, fastTravel._y, fastTravel._dir, 0);
SceneManager.goto(Scene_Map);

What I expected to happen was for the interpreter to run common event 15 and then wait for 65 frames before transferring the player. Instead what happens is that the player is immediately transferred, common event 15 is played after they arrive on the destination map, and then the game waits 65 frames. I'm not sure what I'm missing and why the transfer is still initiating before the wait, though I've sure it's something obvious to anyone that actually knows what they're doing.

For reference, the common event is:
Code:
Show Animation: Player, Teleport Charge (Wait)
Show Animation: Player, Teleport Up
Set Movement Route: Player (Wait)
    Wait: 5 frames
    Transparent ON
    Wait: 60 frames
Anything you put into the interpreter is only going to interact with the interpreter.

That is, you're giving the interpreter a few commands to execute including a wait, but that doesn't make your code wait. So the reserveTransfer(), called outside of the interpreter, is unaffected by the wait.

You could try using the event command version of transfer player (command201).
That does make sense, though after I changed the code to:
JavaScript:
$gameMap._interpreter.command117([15]);
$gameMap._interpreter.setWaitMode('route');
$gameMap._interpreter.wait(65);
$gameMap._interpreter.command201([0,fastTravel._mapId, fastTravel._x, fastTravel._y, fastTravel._dir,0]);
SceneManager.goto(Scene_Map);

The same problem still occurs where the transfer occurs first, followed by the common event and wait. Am I using the command incorrectly? The transfer goes to the correct location without throwing an error, so I assume the parameters I'm passing are correct, but it still happens before the event/wait and I'm not sure why.

I'm not sure if it's relevant, but the fast travel location is on a separate scene. It's a menu to select a location from a list, then after a selection is made SceneManager is instructed to go back to Scene_Map. Could that be causing an issue? Rearranging to goto above the common event and wait doesn't seem to change anything.
That does make sense, though after I changed the code to:
JavaScript:
$gameMap._interpreter.command117([15]);
$gameMap._interpreter.setWaitMode('route');
$gameMap._interpreter.wait(65);
$gameMap._interpreter.command201([0,fastTravel._mapId, fastTravel._x, fastTravel._y, fastTravel._dir,0]);
SceneManager.goto(Scene_Map);

The same problem still occurs where the transfer occurs first, followed by the common event and wait. Am I using the command incorrectly? The transfer goes to the correct location without throwing an error, so I assume the parameters I'm passing are correct, but it still happens before the event/wait and I'm not sure why.
Are you using this script in an event as a script call or are you using this inside of the plugin? Can you show a screenshot?
Why don't you just get rid of all the jerry-rigging of cramming things into the interpreter from a plugin entirely?

Put all of this, including the wait and transfer, into a common event, and the only thing the plugin has to do is set variables for the transfer destination then call the common event.
Are you using this script in an event as a script call or are you using this inside of the plugin? Can you show a screenshot?
It's within a plugin, not a script called within an event. I'm attempting to modify CGMZ_FastTravel to play a common event before initiating the player transfer to the new map.
Why don't you just get rid of all the jerry-rigging of cramming things into the interpreter from a plugin entirely?

Put all of this, including the wait and transfer, into a common event, and the only thing the plugin has to do is set variables for the transfer destination then call the common event.
Putting the transfer into an event would be a much easier way. Is there an easy way to grab the values from a plugin to use in a script call besides just writing it to a temporary game variable?

Edit: For now I have a working version of the code by just passing the parameters into game variables and doing a transfer in a common event. Appreciate the insight. For anyone curious, this is what I did. It's messy, it's ugly, but it works and I'm tired.
JavaScript:
$gameVariables.setValue(16,fastTravel._mapId);
$gameVariables.setValue(15,fastTravel._x);
$gameVariables.setValue(14,fastTravel._y);
$gameTemp.reserveCommonEvent(17);
SceneManager.goto(Scene_Map);

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-figuring-out-wait-times-in-plugin.171756/