Move Route glitch with Pixel Movement

So I am using Victor's Pixel Movement. Found here: https://victorenginescripts.wordpress.com/rpg-maker-vx-ace/pixel-movement/comment-page-1/

And yes, I know. Using pixel movement scripts have consequences that comes with it. But my problem is that when you set a move route for an event(npc), if you go and interrupt their move route, they will start it over and repeat the same movement.
Usually if an events' move route is to 'move right 3 times' and you walk into them only when they've walked 2 tiles over, the event will stop and move again after you have moved out of their way. However, using the pixel movement causes the event to start the move route of walking right 3 times all over again if you get in it's way.So interrupting their move route will cause them to move multiple tiles over that I original would not intend for it to do. It's even worse when I need an NPC to do a complicated move route. Like 'walk up, walk down, walk right, walk left'. Interrupting this move route will cause the npc to walk all over the map and bump into everything. I tested this glitch out on a blank project and it still occurs. So it's not just my project that causes this glitch to happen.
Could you try incorporating a pathfinding script to your blank project (TheoAllen and Jet have made some in the past) and seeing how interfering with that will change its move route?
@mylafter If you're ok with the event going through the player then do this
Code:
class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Overwrite method: collide_with_player_characters?
  #--------------------------------------------------------------------------
  def collide_with_player_characters?(x, y)
    return false if normal_priority? && player_collision?(x, y)
  end
@mylafter If you're ok with the event going through the player then do this
Code:
class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Overwrite method: collide_with_player_characters?
  #--------------------------------------------------------------------------
  def collide_with_player_characters?(x, y)
    return false if normal_priority? && player_collision?(x, y)
  end
Thank you!
@mylafter If you're ok with the event going through the player then do this
Code:
class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Overwrite method: collide_with_player_characters?
  #--------------------------------------------------------------------------
  def collide_with_player_characters?(x, y)
    return false if normal_priority? && player_collision?(x, y)
  end
Sorry for the late reply, but I found another problem. Sometimes the main character might get stuck into the npc after their move route has finished. For example, if the npc walks right 3 times and waits 200 frames, if the MC stands in the position the npc waits for that specific 200 frames, the MC will be stuck till the npc moves again.
the MC will be stuck till the npc moves again
Yes, I noticed this myself. I don't have an answer. maybe someone else can weigh in on this.

*EDIT

Got a fix, not sure if it will work for you
Put the code back to the original. the previous suggestion is not needed.

On line 333 set to this.
Code:
  alias r2_move_straight_check    move_straight
  def move_straight(d, turn_ok = true)
    r2_move_straight_check(d, turn_ok = true)
    @move_list += [{d: [d], turn: turn_ok}] * 7#step_times
  end
Yes, I noticed this myself. I don't have an answer. maybe someone else can weigh in on this.

*EDIT

Got a fix, not sure if it will work for you
Put the code back to the original. the previous suggestion is not needed.

On line 333 set to this.
Code:
  alias r2_move_straight_check    move_straight
  def move_straight(d, turn_ok = true)
    r2_move_straight_check(d, turn_ok = true)
    @move_list += [{d: [d], turn: turn_ok}] * 7#step_times
  end
This causes the MC to move 32 pixels each tile again. Plus, interrupting npc's move route halfway messes up their tile counts. They still move some extra pixels more than they should if their move route is interrupted.
causes the MC to move 32 pixels each tile again
Right sorry, didn't notice.
Try this instead
Code:
@move_list += [{d: [d], turn: turn_ok}] * ($game_player.collide?(x, y) ? step_times : 7)
I still can't get it to not move if it's going to collide with the player. Cause it causes the event to be off position.
Right sorry, didn't notice.
Try this instead
Code:
@move_list += [{d: [d], turn: turn_ok}] * ($game_player.collide?(x, y) ? step_times : 7)
I still can't get it to not move if it's going to collide with the player. Cause it causes the event to be off position.
Okay. Thank you for trying though! I appreciate it. I'll try to see if I can communicate with Victor, the scriptor to try getting this fixed.
can't get it to not move if it's going to collide with the player.
@mylafter Got it figured out.
I read the instructions.
Or a least part of it.

You can use comment tags to specify event collision areas.

I tried 32 by 32 but that didn't work, which makes sense as that would be the size of the sprite itself, but when I enlarged it to 64 by 64 it was detecting the collision in the tile next to it.

So each event will need a comment that says
<event size: 64, 64>

Try it out.
@mylafter Got it figured out.
I read the instructions.
Or a least part of it.

You can use comment tags to specify event collision areas.

I tried 32 by 32 but that didn't work, which makes sense as that would be the size of the sprite itself, but when I enlarged it to 64 by 64 it was detecting the collision in the tile next to it.

So each event will need a comment that says
<event size: 64, 64>

Try it out.
That doesn't work.
Edit. I see. It works if you don't move in the same direction as the event.
Damn. Thought I had it.
bump
bump
bump

Original thread: https://forums.rpgmakerweb.com/threads/move-route-glitch-with-pixel-movement.104625/