Help: Vehicle Encounters?

Hey folks,

May be a stupid request - but does anyone have a script that can enable/disable encounters when on a vehicle in RPGMAKER VX (e.g., boat, ship)...it seems that no matter what I do the encounters on vehicles are disabled. Any way to enable random battles while on a vehicle (maybe in system settings?)

Thanks!
In Game_Player:

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 endendJust comment out the return if in_vehicle? line.If you want to turn it on/off via a switch, instead of commenting it out, put this:

Code:
return if $game_switches[id] && in_vehicle?
where id is the switch number (no leading zeros), and it is turned ON when you want encounters ignored while you're in a vehicle (so call it "Ignore Vehicle Encounters" or something like that)
Thanks a lot, Shaz!

Original thread: https://forums.rpgmakerweb.com/threads/help-vehicle-encounters.37363/