Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Changing Module inside Eventing, I'm just wondering :P
Jonnie19
post Nov 20 2012, 02:04 PM
Post #1


Are you trying to rise from your lullaby?
Group Icon

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 smile.gif

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.

Thanks for your help in advance tongue.gif


__________________________

Finished Projects:
Slenderman's Army:


Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies
Jonnie19
post Nov 28 2012, 04:32 PM
Post #2


Are you trying to rise from your lullaby?
Group Icon

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 tongue.gif


__________________________

Finished Projects:
Slenderman's Army:


Go to the top of the page
 
+Quote Post
   



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 20th May 2013 - 12:29 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker