Event stop without turning

Hello,

I am looking for a way of causing an NPC event to stop moving on activation and talk to you, but not turn.
As it has a custom move route, using set move route on it will cause it to reset and mess up the current position (usually it just gets stuck on a wall). It normally turns in it's custom route so direction fix would not work.
I have this amazing script by Shaz (https://forums.rpgmakerweb.com/index.php?threads/disable-npc-lock.17721/) however it causes the events to continue moving, while I'm looking for them to stop, but still not turn.

If anyone knows of a script or some way to achieve this without one, I would be greatly appreciative.
Thank you very much.
You need to set Direction to fixed on the event page and then you'll just set the turning explicitly via the custom move route.
Try this (not tested). Note, this overwrites the Game_Event.lock method, so if you are using the other script, put this one above it in the list.

Add <noturn> as a comment rather than <nolock> - if you have both scripts, best not to use both tags on the same event page.

Code:
class Game_Event
  alias shaz_noturn_clear_page_settings clear_page_settings
  alias shaz_noturn_setup_page_settings setup_page_settings
 
  #--------------------------------------------------------------------------
  # * Clear Event Page Settings
  #--------------------------------------------------------------------------
  def clear_page_settings
    shaz_noturn_clear_page_settings
    @noturn = false
  end
  #--------------------------------------------------------------------------
  # * Set Up Event Page Settings
  #--------------------------------------------------------------------------
  def setup_page_settings
    shaz_noturn_setup_page_settings
    list_index = 0
    while list_index < @list.size && [108,408].include?(@list[list_index].code)
      if @list[list_index].parameters[0] =~ /<noturn>/i
        @noturn = true
        break
      end
      list_index += 1
    end
  end
  #--------------------------------------------------------------------------
  # * Lock (Processing in Which Executing Events Stop)
  #--------------------------------------------------------------------------
  def lock
    unless @locked
      @prelock_direction = @direction
      turn_toward_player unless @noturn
      @locked = true
    end
  end
end
You need to set Direction to fixed on the event page and then you'll just set the turning explicitly via the custom move route.

Ah, thank you; yes it does work if I set direction fix on after each turn and off right before, though it is a bit tedious.
Try this (not tested). Note, this overwrites the Game_Event.lock method, so if you are using the other script, put this one above it in the list.

Add <noturn> as a comment rather than <nolock> - if you have both scripts, best not to use both tags on the same event page.

Code:
class Game_Event
  alias shaz_noturn_clear_page_settings clear_page_settings
  alias shaz_noturn_setup_page_settings setup_page_settings
 
  #--------------------------------------------------------------------------
  # * Clear Event Page Settings
  #--------------------------------------------------------------------------
  def clear_page_settings
    shaz_noturn_clear_page_settings
    @noturn = false
  end
  #--------------------------------------------------------------------------
  # * Set Up Event Page Settings
  #--------------------------------------------------------------------------
  def setup_page_settings
    shaz_noturn_setup_page_settings
    list_index = 0
    while list_index < @list.size && [108,408].include?(@list[list_index].code)
      if @list[list_index].parameters[0] =~ /<noturn>/i
        @noturn = true
        break
      end
      list_index += 1
    end
  end
  #--------------------------------------------------------------------------
  # * Lock (Processing in Which Executing Events Stop)
  #--------------------------------------------------------------------------
  def lock
    unless @locked
      @prelock_direction = @direction
      turn_toward_player unless @noturn
      @locked = true
    end
  end
end




Ah, thank you so much Shaz; the script works perfectly!

Original thread: https://forums.rpgmakerweb.com/threads/event-stop-without-turning.100514/