RPG Maker VX Ace

RPG Maker VX Ace

View Stats:
Help Me fix pixel movement boat disembarking.
I don't know the correct script for if player facing left or up,
this will allow the boat to move up half a pixel so the player can re-enter the boat.
$game_player.direction = 4 doesn't work sadly as the if condition isn't triggering.

Game_Vehicle Default Script
#--------------------------------------------------------------------------
# * Get Off Vehicle
#--------------------------------------------------------------------------
def get_off
@driving = false
@walk_anime = false
@step_anime = false
@walking_bgm.play
@through = true
if $game_player.direction = 4
move_forward
@through = false
-----------------------------------------------------------------------------
I also edited Game_Player Script, this adds through on/move forward/off
so the player is fully on the beach when disembarking left/up.
#--------------------------------------------------------------------------
# * Update Disembarking from Vehicle
#--------------------------------------------------------------------------
def update_vehicle_get_off
if !@followers.gathering? && vehicle.altitude == 0