Main Menu
  • Welcome to The RPG Maker Resource Kit.

[Resolved]ACS in game enable/disable

Started by ldkraven, August 25, 2011, 11:16:32 PM

0 Members and 1 Guest are viewing this topic.

ldkraven

Okay so i've looked everywhere and i can't figure out how to enable or disable the crafting option in the main menu while in game. Here is a link to the script:

ACS by Cmpsr2000
http://www.rpgrevolution.com/forums/index.php?showtopic=13359

The part i've been trying to tweak is around line 27 in the Redefinitions part:

  def start
    #--------------------------------------------------------------------------
    # Set this to true if you want to disable the "crafting" entry in the menu
    #--------------------------------------------------------------------------
    @disableMenuChoice = false
   


i've tried changing it to a switch but i think im doing it wrong. anyone know how to do this?

JonFawkes

Are you using any custom menus? You might have to edit those scripts to remove that option from the menu

ldkraven

No custom menu script. and im trying to enable/disable the crafting option from the menu while the game is playing, not permanently. But thanks for the help regardless.

pacdiggity

You could put a line sayingif $game_variables != nil && !$game_variables[SWITCH_ID]before the methods that put it in the menu, and an extra end after those methods. That would mean that when the switch with id SWITCH_ID is on, there is no menu option.
it's like a metaphor or something i don't know

ldkraven

#4
Thanks Pacman, but I actually figured it out. I appreciate the help though, had i gone to bed instead of working on the dialogue i never would have thought of it. Here is what I did:

This is What the original Script looked like:

[spoiler]

class Scene_Menu < Scene_Base
 
  def start
    #--------------------------------------------------------------------------
    # Set this to true if you want to disable the "crafting" entry in the menu
    #--------------------------------------------------------------------------
    @disableMenuChoice = false
   
    super
    create_menu_background
    if @disableMenuChoice
      oldCmdWindow
    else
      create_command_window
    end
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
  end
 




[/spoiler]

And this is what I have now:

[spoiler]class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------#
# Set this to the Switch you want to Control the Crafting Menu Option      #
#--------------------------------------------------------------------------#
  Disable_Menu_Switch_ID = 15
 
  def start
   
    @disableMenuChoice = $game_switches[Disable_Menu_Switch_ID]

    super
    create_menu_background
    if @disableMenuChoice
      oldCmdWindow
    else
      create_command_window
    end
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
  end
 




[/spoiler]

It's been so long since I've played around in ruby that i was setting it to a variable instead of a switch. lol ^.^


pacdiggity

I was setting it to a variable as well... hmm... I need some sleep.
But I'm glad you figured it out. In a way better than mine too!
it's like a metaphor or something i don't know