Menuscreen while message disable on some events

Hello,


I need to disable this script on some events instead of scene.


I think it should be possible by a script call, anyway i can't find any script call here.


Could someone help me? ;_;


Sorry if i'm posting in a wrong section ><


Thankyou before!

Spoiler
Code:
#===================================
# MenuScreen While Message (MSWM)
#===================================
# by bStefan aka. regendo
# by request from AABattery
# : http://www.rpgmakervxace.net/index.php?/user/608-aabattery/
# please give credit if used
# for use with RMVX ACE
#===================================
# Call Scene_Menu while a message
# : is being displayed
#===================================
# implement over Main
#===================================
# customize:
# : add Scenes you don't want the
# : script to happen to NOCALLMENU
# : (like Scene_Battle, which would
# : be really annoying)
#===================================

module Regendo
  
  unless @scripts
    @scripts = Hash.new
    def self.contains?(key)
      @scripts[key] == true
    end
  end
  @scripts["Menu_during_Message"] = true
  
  module Menu_during_Message
    
    #=======
    #CONFIG
    #=======
    NOCALLMENU = [Scene_Title, Scene_Battle] #scenes in which call_menu shall not work.
    BUTTON = Input::B #which button will trigger the menu?
  end
end
  
class Window_Message < Window_Base

  BUTTON = Regendo::Menu_during_Message::BUTTON
  NOCALLMENU = Regendo::Menu_during_Message::NOCALLMENU
  
  alias update_old update
  def update
    update_old
    call_menu if Input.trigger?(BUTTON) && !forbidden_scene_by_regendo
  end
  
  def call_menu
    Sound.play_ok
    SceneManager.call(Scene_Menu)
    Window_MenuCommand::init_command_position
  end

  def input_pause
    self.pause = true
    wait(10)
    
    case BUTTON
    when Input::B
      Fiber.yield until Input.trigger?(:C)
    when Input::C
      Fiber.yield until Input.trigger?(:B)
    else
      Fiber.yield until Input.trigger?(:B) || Input.trigger?(:C)
    end
    
    Input.update
    self.pause = false
  end
  
  def forbidden_scene_by_regendo
    return false unless NOCALLMENU
    NOCALLMENU.any? do |scene|
      SceneManager.scene_is?(scene)
    end
  end
end
Afraid you'll need a script edit. The author didn't write that in a way so that it can be turned off for some specific events (only for scenes). I can move this to script requests for you so you can request an edit if you wish.
Yes, please,


And thankyou for you respond, again 😀
Ok


Moved to RGSS3 Script Requests at OP's Request
Sorry but could I bump?
Allocate a switch that you will turn on when you want the menu call disabled.  I'll use 15 in my example below, so where you see 15, replace it with the switch id you want to use (no leading zeros).


Change this line:

Code:
call_menu if Input.trigger?(BUTTON) && !forbidden_scene_by_regendo

to this:

Code:
call_menu if Input.trigger?(BUTTON) && !forbidden_scene_by_regendo && !$game_switches[15]



Then turn that switch on when you want to disable the menu call, and off to enable it again.
Allocate a switch that you will turn on when you want the menu call disabled.  I'll use 15 in my example below, so where you see 15, replace it with the switch id you want to use (no leading zeros).


Change this line:

Code:
call_menu if Input.trigger?(BUTTON) && !forbidden_scene_by_regendo

to this:

Code:
call_menu if Input.trigger?(BUTTON) && !forbidden_scene_by_regendo && !$game_switches[15]



Then turn that switch on when you want to disable the menu call, and off to enable it again.



It works! Thankyou so much shaz!!! xD

Original thread: https://forums.rpgmakerweb.com/threads/menuscreen-while-message-disable-on-some-events.72193/