The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: Cronic393 on August 26, 2011, 02:44:55 AM

Title: VX ACS crafting system variable attachment
Post by: Cronic393 on August 26, 2011, 02:44:55 AM
So im working on this game with my cousins, were using the crafting system ACS, and wish to remove it from the menu until later in the game. we have tried attaching a variable to the switch and having an event activate the switch, but the script isn't set up to be attached to a variable and we get the error 

'Script 'Redefinitions' Line 27: NoMethodError Occurred.
undefined method '[]=' nil:NilClass

thats the error the coding i have for the switch is this

#--------------------------------------------------------------------------
    # Set this to true if you want to disable the "crafting" entry in the menu
    #--------------------------------------------------------------------------
    @disableMenuChoice[0015] = true
   
    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


the varriable is an old man so we can have him teach you to craft

first it sets move rout to face you, he asks you if u want to learn to craft, if you choose yes it turns control switch 0015 on, if no it turns it off, i cant copy the text so i hope this helps, the 3 of us together cannot figure this out. i read that the author was going to fix a similar issue in the next version, but cant find any newer than 2.21 please help
Title: Re: VX ACS crafting system variable attachment
Post by: Infinate X on August 26, 2011, 05:35:36 PM
I think Pacman made a menu script that you can add/remove menu options. If you don't want the classic feel you can use one of MA's menu scripts :P
Title: Re: VX ACS crafting system variable attachment
Post by: pacdiggity on August 27, 2011, 03:53:20 AM
Replace that with this    @disableMenuChoice = $game_switches ? $game_switches[15] : true
   
    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

When the switch is on, it will function normally.
@X - I haven't implemented that feature exactly yet. I'm working on it.