Simple Move Route And Event Touch Script?

So I wan't to know can someone make me a super simple script that lets
move route's "For the player" touch events. Can someone make like a notetag
or a comment you could put into an event so that the player can touch it if
even if the player is in a moveroute... I would also like it to stop the player untill
the event is finished...
First, please refrain from using the word "super simple" because most of the time, it is not. Unless you know what you're talking about.

Second, it might not what you're looking for, but someone might able to manipulate it(?)
https://github.com/theoallen/RGSS3/blob/master/Event Queues.rb
It's an event queue to run the next event when the current event is done.
First, please refrain from using the word "super simple" because most of the time, it is not. Unless you know what you're talking about.

Second, it might not what you're looking for, but someone might able to manipulate it(?)
https://github.com/theoallen/RGSS3/blob/master/Event Queues.rb
It's an event queue to run the next event when the current event is done.
I hope somone could...
It really doesn't have to be simple...
So you want the event to start if the player touches it during the move route? Does the player continue with their move route after the event has finished, or is the move route interrupted?
So you want the event to start if the player touches it during the move route? Does the player continue with their move route after the event has finished, or is the move route interrupted?
The move route is interrupted...
I think you need to clarify this.

In your first post you said the move route should be stopped until the event is finished which sounds like you want it to complete. But in your post just then, you were asked if the move route should continue afterwards, or if it should be interrupted (the opposite of continue - to stop completely) and you said it should be interrupted. I think you may be placing a different meaning on the word interrupted than @A-Moonless-Night is, and it needs to be clear.

If you have a move route to move forward 5 times, and the player encounters a Player Touch event on move 3, after the event executes, do you want the player to move the other 2 spaces forward?
I think you need to clarify this.

In your first post you said the move route should be stopped until the event is finished which sounds like you want it to complete. But in your post just then, you were asked if the move route should continue afterwards, or if it should be interrupted (the opposite of continue - to stop completely) and you said it should be interrupted. I think you may be placing a different meaning on the word interrupted than @A-Moonless-Night is, and it needs to be clear.

If you have a move route to move forward 5 times, and the player encounters a Player Touch event on move 3, after the event executes, do you want the player to move the other 2 spaces forward?
No it just stops the player...
All right, see if this works for you:
Spoiler
Code:
=begin
#==============================================================================#
#   AMN Interrupt Events
#   Version 1.01
#   Author: AMoonlessNight
#   Date: 23 Feb 2019
#   Latest: 23 Feb 2019
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 23 Feb 2019 - created the script
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - Please credit AMoonlessNight or A-Moonless-Night
# - Free for non-commercial use
# - Contact for commercial use
# - I'd love to see your game if you end up using one of my scripts
#==============================================================================#

This script makes it so that the player can trigger specific 'player touch'
events while moving via move route.

Use the following notetag in a comment inside the event:
<interrupt>
 
=end

#==============================================================================
#  Please do not edit below this point unless you know what you are doing.
#==============================================================================
class RPG::Event::Page
  def note
    @note = ""
    return @note if !@list || @list.size <= 0
    note_list = []
    @list.each { |item|
      next unless item && [108, 408].include?(item.code)
      note_list << item.parameters[0]
    }
    @note = note_list.join("\r\n")
    return @note
  end
end

class Game_Player < Game_Character

  def check_event_trigger_touch_interrupt
    x2 = $game_map.round_x_with_direction(@x, @direction)
    y2 = $game_map.round_y_with_direction(@y, @direction)
    start_map_event_interrupt(x2, y2, [1,2])
  end
 
  def start_map_event_interrupt(x, y, triggers)
    return if $game_map.interpreter.running?
    $game_map.events_xy(x, y).each do |event|
      if event.trigger_in?(triggers) && event.normal_priority? && event.can_interrupt?
        event.start
      end
    end
  end
 
  def update_routine_move
    if @wait_count > 0
      @wait_count -= 1
    else
      @move_succeed = true
      command = @move_route.list[@move_route_index]
      if command
        check_event_trigger_touch_interrupt
        process_move_command(command)
        advance_move_route_index
      end
    end
  end
 
end

class Game_Event < Game_Character
  attr_reader   :event
 
  def note
    return "" if !@page || [email protected] || @page.list.size <= 0
    @page.note
  end
 
  def can_interrupt?
    note.include?("<interrupt>")
  end
end

I used it like so:
Spoiler
Untitled-1.png
All right, see if this works for you:
Spoiler
Code:
=begin
#==============================================================================#
#   AMN Interrupt Events
#   Version 1.01
#   Author: AMoonlessNight
#   Date: 23 Feb 2019
#   Latest: 23 Feb 2019
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 23 Feb 2019 - created the script
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - Please credit AMoonlessNight or A-Moonless-Night
# - Free for non-commercial use
# - Contact for commercial use
# - I'd love to see your game if you end up using one of my scripts
#==============================================================================#

This script makes it so that the player can trigger specific 'player touch'
events while moving via move route.

Use the following notetag in a comment inside the event:
<interrupt>
 
=end

#==============================================================================
#  Please do not edit below this point unless you know what you are doing.
#==============================================================================
class RPG::Event::Page
  def note
    @note = ""
    return @note if !@list || @list.size <= 0
    note_list = []
    @list.each { |item|
      next unless item && [108, 408].include?(item.code)
      note_list << item.parameters[0]
    }
    @note = note_list.join("\r\n")
    return @note
  end
end

class Game_Player < Game_Character

  def check_event_trigger_touch_interrupt
    x2 = $game_map.round_x_with_direction(@x, @direction)
    y2 = $game_map.round_y_with_direction(@y, @direction)
    start_map_event_interrupt(x2, y2, [1,2])
  end
 
  def start_map_event_interrupt(x, y, triggers)
    return if $game_map.interpreter.running?
    $game_map.events_xy(x, y).each do |event|
      if event.trigger_in?(triggers) && event.normal_priority? && event.can_interrupt?
        event.start
      end
    end
  end
 
  def update_routine_move
    if @wait_count > 0
      @wait_count -= 1
    else
      @move_succeed = true
      command = @move_route.list[@move_route_index]
      if command
        check_event_trigger_touch_interrupt
        process_move_command(command)
        advance_move_route_index
      end
    end
  end
 
end

class Game_Event < Game_Character
  attr_reader   :event
 
  def note
    return "" if !@page || [email protected] || @page.list.size <= 0
    @page.note
  end
 
  def can_interrupt?
    note.include?("<interrupt>")
  end
end

I used it like so:
Wow this works great!!! Thanks alot!

Original thread: https://forums.rpgmakerweb.com/threads/simple-move-route-and-event-touch-script.105920/