Problem with ship docking event

So I want to have a system where if my ship touches the side of a port town, it docks. Once it docks, the character is supposed to exit the ship and appear at a designated point. (It also turns on a switch that calls a tile-swapping script to make the ship appear at the otherwise empty port.)
The problem is, she doesn't exit the ship even though I've set her to do that. I have to press space and she will exit, but the ship will be sitting there stuck on a wooden floor. Because of this (I also have it set the ship's location so that she can get on again when exiting the town by way of the port, but due to the problem the ship's location becomes in the town), when she touches the event to get her back to the ship she doesn't get on the ship, she's just stuck in the middle of the ocean.

Here is the docking event:

Spoiler
1.png
Here is the leaving event:

Spoiler
2.png
This is the tile-swapping event in case it's important (script from here: http://forums.rpgmakerweb.com/index.php?/topic/9396-easy-tile-swapping/ )

Spoiler
3.png
You probably want to add an Erase Event on your region swapping script, otherwise it's going to do that swap on every frame, and you only need it done once as the map loads.


Have you tried to set the priority to Below Characters and moving the event one tile back?


Also, not sure on this, but you may need to add a short Wait after getting on/off the vehicle.
Have you tried to set the priority to Below Characters and moving the event one tile back?
Which one - the docking or the leaving?
docking.
Okay, I tried the waiting for the docking event. It worked, thank you!

I still have problems with the leaving event. Now my character ends up stuck in the ocean, on top of the ship with no way to get on.

New leaving event:

Spoiler
4_1.png
Can you show a screenshot of your map, highlighting where this event is and where your vehicle is?


Is the event above on the same map as the vehicle? I'm guessing not. There are two issues here.


For the player to get on a vehicle, they have to be standing one tile away from the vehicle, facing it. You're teleporting them ONTO the vehicle.


The other issue is that when you teleport to a new map, not all the following commands in your event will be run. Try it with moving them a tile above the ship, and if that doesn't work, you might need to set an event on the world map to have the get on/off vehicle command.
I tried moving the vehicle one tile to the right - it worked! Thank you so much!

Now the event works perfectly, thanks.

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-ship-docking-event.36489/