[Solved] How to make an attack that transfers the player location?

As part of my game, I'm making a cave area where there are certain enemies that pull you deeper underground into more dangerous areas when they catch the player.
To achieve this, I want to give these enemies a skill/attack that transfers the player to another map based on what map they are currently in.
enemytransfer.png

I've tried making a troop event that transfers the player to a map and giving the enemy a skill that activates a common event to do the same thing, but neither of those ideas panned out.

Thank you in advance to anyone who can help me figure this out.
Make a skill that calls a common event that activates a switch. Abort the battle in a troop event based on that switch. Make a second common event that also checks for that switch and does the transfer, then turn off the switch again in that common event.
Make a skill that calls a common event that activates a switch. Abort the battle in a troop event based on that switch. Make a second common event that also checks for that switch and does the transfer, then turn off the switch again in that common event.
Worked like a charm! Thank ya.
I ended up with my transfer common event looking something like this. I have a variable that's set to the map id, with conditionals that trigger based on that. This way I can have the player get pulled deeper and deeper into the dark caverns based on which map they started from. Joy 😀
1744398398607.png

Original thread: https://forums.rpgmakerweb.com/threads/solved-how-to-make-an-attack-that-transfers-the-player-location.176873/