The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: jameswhite89 on October 14, 2011, 09:28:10 PM

Title: Battle whislt on vehicle
Post by: jameswhite89 on October 14, 2011, 09:28:10 PM
Was wondering if there was a script that existed that allowed you to battle whilst driving in a vehicle, if not could some one make one?

Please and thanks :)
Title: Re: Battle whislt on vehicle
Post by: modern algebra on October 14, 2011, 10:14:35 PM
Well, I'd suggest putting this in its own slot below the default scripts but above any other custom scripts since it overwrites a method, but it might do the trick:

Code: [Select]
class Game_Player
  #--------------------------------------------------------------------------
  # * Update Encounter
  #--------------------------------------------------------------------------
  def update_encounter
    return if $TEST and Input.press?(Input::CTRL)   # During test play?
#~     return if in_vehicle?                           # Riding in vehicle?
    if $game_map.bush?(@x, @y)                      # If in bush
      @encounter_count -= 2                         # Reduce encounters by 2
    else                                            # If not in bush
      @encounter_count -= 1                         # Reduce encounters by 1
    end
  end
end

All I did was comment out the line which prevents the encounter count and I never tested anything. I don't know if it will do anything weird once you leave battle, but hopefully not. If it does though, let me know and I will look at the problem in more detail.
Title: Re: Battle whislt on vehicle
Post by: jameswhite89 on October 14, 2011, 10:43:05 PM
Thanks alot ill give it a whirl now :)