Super Simple Vehicle System & World Map

can someone help me out here? I'm kinda new with scripting...
help me please! Spoiler
whenever I enter a vehicle, the vehicle turns purple and doesn't move anywhere... I'm not quite sure what I'm doing wrong...
here's what it looks like...

class Game_Character
  def passable?(x, y, d)
   
    # Get new coordinates
    new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
    new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
   
    # If coordinates are outside of map
    unless $game_map.valid?(new_x, new_y)
      return false
    end
   
    # If through is ON
    if @through
      return true
    end
       
    # If unable to leave first move tile in designated direction
    unless $game_map.passable?(x, y, d, self)
      return false
    end
   
    # If unable to enter move tile in designated direction
    unless $game_map.passable?(new_x, new_y, 10 - d)
      return false
    end
       
    #check terrain for vehicle
    check_terrain(new_x, new_y)   
     
    # Loop all events
    for event in $game_map.events.values
      # If event coordinates are consistent with move destination
      if event.x == new_x and event.y == new_y
        @state = true
        # If through is OFF
        unless event.through
          # If self is event
          if self != $game_player
            return false
          end
          # With self as the player and partner graphic as character
          if event.character_name != ""
            return false
          end
        end
      end
    end
   
    if @state == false
      return false
    end     
   
    # If player coordinates are consistent with move destination
    if $game_player.x == new_x and $game_player.y == new_y
      # If through is OFF
      unless $game_player.through
        # If your own graphic is the character
        if @character_name != ""
          return false
        end
      end
    end
     
   
    return true
   
  end
 
  #--------------------------------------------------------------------------
  # * Check the terrain for the vehicle
  #   @terrain (0=none, 1=river, 2=ocean, 3=air, 4=ground)
  #   @vehicle (0=foot, 1=canoe, 2=boat, 3=dragon)
  #   @state (true=passable tile, false=unpassable tile)
  #--------------------------------------------------------------------------
  def check_terrain(new_x, new_y) 
    @state = false
    @terrain = $game_map.terrain_tag(new_x, new_y)
    @vehicle = $game_variables[1]
   
    @state = true if @vehicle == 0 && @terrain == 4  #foot & ground
    @state = true if @vehicle == 1 && @terrain == 3  #canoe & river
    @state = true if @vehicle == 2 && @terrain == 2  #boat & ocean
    @state = true if @vehicle == 3                   #dragon
    @state = true if @terrain == 0
  end

end

class Game_Player < Game_Character
 
  alias in_vehicle_alias update
  #--------------------------------------------------------------------------
  # * Memorize actor graphic
  #--------------------------------------------------------------------------     
  def actor_memorize
    @actor_name = $game_actors[1].character_name
    @actor_hue = $game_actors[1].character_hue
    @battler_name = $game_actors[1].battler_name
    @battler_hue = $game_actors[1].battler_hue
    return true
  end

  #--------------------------------------------------------------------------
  # * Restore actor graphic
  #--------------------------------------------------------------------------     
  def actor_restore
    actor = $game_actors[1]
    actor.set_graphic(@actor_name.to_s, @actor_hue, @battler_name.to_s, @battler_hue)
    $game_player.refresh
    return true
  end   
 
  #--------------------------------------------------------------------------
  # * Enter a vehicle
  #--------------------------------------------------------------------------       
  def enter_vehicle(type)
   
    $game_system.menu_disabled = true
    $game_system.save_disabled = true   
   
    if type != "dragon"
      @through = true
      move_forward
      @through = false   
    end
   
    actor_memorize
    actor = $game_actors[1]   
    actor.set_graphic(type, @actor_hue, @battler_name.to_s, @battler_hue)
   
    $game_switches[285] = false    #Canoe Off     
    $game_switches[283] = false    #Boat Off     
    $game_switches[284] = false    #Dragon Off         
   
    if type == "canoe"
      $game_variables[1] = 1       #set terrian
      $game_switches[285] = true    #Canoe On
      Audio.bgm_play("Audio/BGM/047-Positive05", 100, 100) #play canoe music
 
    elsif type == "boat"
      $game_variables[1] = 2       #set terrian
      $game_switches[283] = true    #Boat On     
      Audio.bgm_play("Audio/BGM/046-Positive04", 100, 100) #play ship music
     
    elsif type == "dragon"
      $game_variables[1] = 3       #set terrian
      $game_switches[284] = true    #Dragon On 
      Audio.bgm_play("Audio/BGM/045-Positive03", 100, 100) #play dragon music
     
    end
   
    $game_player.refresh
    $game_map.refresh
   
    return true
  end

  #--------------------------------------------------------------------------
  # * Enter a vehicle
  #--------------------------------------------------------------------------       
  def exit_vehicle

    $game_system.menu_disabled = false   
    $game_system.save_disabled = false
   
    if @terrain == 4
           
      if $game_switches[285] == true      #getting off canoe
        canoe = $game_map.events[3]     #get canoe event
        canoe.moveto(x, y)              #move to player's x, y coords
        $game_switches[285] = false       #Canoe Off   
        $game_variables[55] = x          #set canoe x coord
        $game_variables[56] = y          #set canoe y coord
        @through = true
        move_forward
        @through = false         
       
      elsif $game_switches[283] == true   #getting off boat
        boat = $game_map.events[2]      #get boat event
        boat.moveto(x, y)               #move to player's x, y coords       
        $game_switches[283] = false       #Boat Off   
        $game_variables[57] = x          #set boat x coord
        $game_variables[58] = y          #set boate y coord 
        @through = true
        move_forward
        @through = false                 
       
      elsif $game_switches[284] == true   #getting off dragon
        dragon = $game_map.events[4]    #get dragon event
        dragon.moveto(x, y)             #move to player's x, y coords       
        $game_switches[284] = false       #Dragon Off   
        $game_variables[59] = x          #set dragon x coord
        $game_variables[60] = y          #set dragon y coord       
      end
     
      # get off vehicle
      actor_restore
   
      # reset terrain
      $game_variables[1] = 0           
   
      # play walking music
      Audio.bgm_play("Audio/BGM/044-Positive02", 100, 100) #play music
     
      $game_player.refresh 
      $game_map.refresh   
   
    end
 
  end
 
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    in_vehicle_alias
    # if not on ground terrain, check for boat exit
    if $game_variables[1] != 0
      if Input.trigger?(Input::C)
        exit_vehicle
      end   
    end
  end

end
Expand to see the code.

variables:
55=conoe X
56=conoe y
57=boat x
58=boat y
59=dragon x
60=dragon y
switches:
285=conoe off
283=boat off
284=dragon off

... WHAT DO I DO?!
Not sure if this has already been called to your attention, but it's possible to become the canoe. :P

I rode the dragon to where the canoe was, faced the canoe, and pressed C while facing the canoe (and standing in the correct spot to mount the dragon, which I did.) I rode the dragon to the ice island. As soon as I dismounted, though, Arshes' caracterset had been replaced with that of the canoe. Nothing could reverse the change, not even climbing into the canoe and out again.

Again, sorry if this has been brought up already. I know how much it sucks to hear so much repetition about a bug or something.

EDIT: Oh, hell, it has. Well, sorry.
This is a perfect script and just the tileset and autotiles I was looking for. 

Thanks.
It's cool script but I have one problem:
http://i28.tinypic.com/11rr91c.jpg[/img]
When I'm going to another land, boat turn again to place where it was before.

P.S.Sorry for my English ;]
amazing tru;y i have been looking for this to make my own final fastasy 3 game thanks
iamnotknown wrote:
amazing tru;y i have been looking for this to make my own final fastasy 3 game thanks


wow. talk about a necro posting.
Here's a link for an update by DerVVulfman and others http://punkid89.b1.jcink.com/index.php?showtopic=266
Please don't post large amounts of redundant data. (a copy of the first post)

I'm new with Scripting..... how do I put this in a game? Thanks
Check the FAQ. Look for "How do I Install...."

viewtopic.php?f=155&t=10513
Thanks!
Monia334 wrote:
It's cool script but I have one problem:
http://i28.tinypic.com/11rr91c.jpg[/img]
When I'm going to another land, boat turn again to place where it was before.

P.S.Sorry for my English ;]


um i think for this you must go into the script, and on line 174 change the event to the boats event
It works Thanks!!! ^_^
I found DerVvulfman's Enhanced World map, here:
http://rmvxp.com/thread-522.html?highli ... cle+System

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=28741