[RMVX ACE] LOOKING FOR A SIMPLE SCRIPT THAT CAN DISABLE ITEMS TEMPORARILY

Posts

Pages: 1
Good day chaps! So in my game I want to disable the use of items
or just disable the item option on the menu temporarily.
Just something so the player can't use items without disabling the
other menu commands.
Marrend
Guardian of the Description Thread
21806
It might depend on the exact circumstances. However, you can use a game-switch to determine whether or not certain menu items are available. For example, in...

class Window_MenuCommand < Window_Command
  def add_main_commands
    add_command(Vocab::item,   :item,   $game_switches[1])
    add_command(Vocab::skill,  :skill,  main_commands_enabled)
    add_command(Vocab::equip,  :equip,  main_commands_enabled)
    add_command(Vocab::status, :status, main_commands_enabled)
  end
end

...this instance, the "Item" command cannot be used unless $game_switches[1] (ie: the first one listed in Control Switches) is active (turned on).
author=Marrend
It might depend on the exact circumstances. However, you can use a game-switch to determine whether or not certain menu items are available. For example, in...

class Window_MenuCommand < Window_Command
  def add_main_commands
    add_command(Vocab::item,   :item,   $game_switches[1])
    add_command(Vocab::skill,  :skill,  main_commands_enabled)
    add_command(Vocab::equip,  :equip,  main_commands_enabled)
    add_command(Vocab::status, :status, main_commands_enabled)
  end
end

...this instance, the "Item" command cannot be used unless $game_switches[1] (ie: the first one listed in Control Switches) is active (turned on).
Hey this is worth a shot thanks! I was using Yanfly's custom menu and after a few edits I implemented this into the script and now it works perfectly! Thanks a million!
SunflowerGames
The most beautiful user on RMN!
13323

Add a invisible state to each player that locks items. Then remove the state when you want.
Pages: 1