Random Encounters When Moving

In one section of my game, I'm making a labyrinth where the character moves on his own, in the direction the player chooses.

For instance, the character moves down, and when he reaches an intersection, the player chooses "Left" or "Right".

The only problem is, I want to add in random encounters, but no monsters show up when the player is moving by Set Move Route.

Is there a way to enable random encounters when setting the move route?

Thanks.
Hey ♫

I have not tested it completely, so their may be some bugs, but try this:

Spoiler
Code:
################# Kaimonkey's Move Route Encounters Snippet################class Game_Player < Game_Character  #--------------------------------------------------------------------------  # * Execute Encounter Processing  #--------------------------------------------------------------------------  def encounter    #return false if $game_map.interpreter.running?    return false if $game_system.encounter_disabled    return false if @encounter_count > 0    make_encounter_count    troop_id = make_encounter_troop_id    #return false unless $data_troops[troop_id]    BattleManager.setup(troop_id)    BattleManager.on_encounter    return true  end  def update_encounter    return if $TEST && Input.press?(:CTRL)    return if $game_party.encounter_none?    return if in_airship?    #return if @move_route_forcing    @encounter_count -= encounter_progress_value  end  def update_nonmoving(last_moving)    if $game_map.interpreter.running?      update_encounter if last_moving    else      if last_moving        $game_party.on_player_walk        return if check_touch_event      end      if movable? && Input.trigger?(:C)        return if get_on_off_vehicle        return if check_action_event      end      update_encounter if last_moving    end  endend 
It worked, until I found out it's not compatible with Ace Core Engine: https://yanflychannel.wordpress.com/rmvxa/core-scripts/ace-core-engine/

Could you alter it or make a patch?

Other than that, it's perfect.
Are you sure that's the script that has the incompatibility issue? I havn't tested it yet, but I read through the whole code and there's no reason the two should interact

EDIT: Tested with the script, and it worked perfectly. Do you have anyother scripts installed?

EDIT EDIT: Wait, nevermind, found the bug, was nothing to do with Yanfly, but was to-do with when you are on a map with no encounters.

Here is the fix

Spoiler
Code:
################# Kaimonkey's Move Route Encounters Snippet################class Game_Player < Game_Character  #--------------------------------------------------------------------------  # * Execute Encounter Processing  #--------------------------------------------------------------------------  def encounter    #return false if $game_map.interpreter.running?    return false if $game_system.encounter_disabled    return false if @encounter_count > 0    make_encounter_count    troop_id = make_encounter_troop_id    return false unless $data_troops[troop_id]    BattleManager.setup(troop_id)    BattleManager.on_encounter    return true  end  def update_encounter    return if $TEST && Input.press?(:CTRL)    return if $game_party.encounter_none?    return if in_airship?    #return if @move_route_forcing    @encounter_count -= encounter_progress_value  end  def update_nonmoving(last_moving)    if $game_map.interpreter.running?      update_encounter if last_moving    else      if last_moving        $game_party.on_player_walk        return if check_touch_event      end      if movable? && Input.trigger?(:C)        return if get_on_off_vehicle        return if check_action_event      end      update_encounter if last_moving    end  endend  
Oh yeah, that was it...

Well, thanks a lot for the fix!

Original thread: https://forums.rpgmakerweb.com/threads/random-encounters-when-moving.41856/