Group: Global Mod
Posts: 1,311
Type: Developer
RM Skill: Intermediate
Rev Points: 45
So, I'm now jumping into scripting, so after working with abit of JS thanks to Code Acadamy. I'm attempting to make my first menu script... Basically I am looking for three seperate menu backgrounds for each of the three Characters. I'm using GubID's FFT Menu Script Tutorial to help start me out
Anywho, here is the beginning of the script (At the moment I'm just trying to get the actual thing to change when I use an Script Even command.
My small script
CODE
module Lullaby_Menu #----------------------------------------------------------------------------- # Menu_Background_Type #----------------------------------------------------------------------------- # 0 = First Character # 1 = Second Character # 2 = Third Character #----------------------------------------------------------------------------- Menu_Character_Type = 0 First_Chara_BG = "Menu_Back" Second_Chara_BG = "Menu_Back1" Third_Chara_BG = "Menu_Back2" end class Scene_Menu < Scene_Base def start create_menu_background case Lullaby_Menu::Menu_Character_Type when 0 bitmap = Cache.system(Lullaby_Menu::First_Chara_BG) @menuback_sprite.bitmap = bitmap when 1 bitmap = Cache.system(Lullaby_Menu::Second_Chara_BG) @menuback_sprite.bitmap = bitmap when 2 bitmap = Cache.system(Lullaby_Menu::Third_Chara_BG) @menuback_sprite.bitmap = bitmap end end def update if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new end end def terminate super dispose_menu_background end end
Now, what I wanna know is how to change
CODE
Menu_Character_Type = 0
inside an event command. I know this is probably easy for experience scripters, and may seem a stupid question, but hey I'm learning.
Group: Global Mod
Posts: 1,311
Type: Developer
RM Skill: Intermediate
Rev Points: 45
Thankyou guys, it is now working perfectly, I never considered using Hash before now, but it really is alot easier XD so thanks to both of you for your help