[XP] Stormtronics CMS

Started by Blizzard, January 09, 2008, 04:00:35 pm

Previous topic - Next topic

Blizzard

Believe it or not, at one moment I wanted to do that. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

reaper72004

June 03, 2009, 07:20:28 am #241 Last Edit: June 03, 2009, 07:24:34 am by reaper72004
Edit: haha got it

Calintz

June 03, 2009, 08:21:33 pm #242 Last Edit: June 03, 2009, 08:22:44 pm by Calintz16438
Hey Blizzard ...

Let's say that I wanted to run a common event when selecting an option from the menu's index, is that possible?? If so, how and where would I edit the script??

**Note
I tried doing what you had mentioned in the thread about calling common events from the script, but I couldn't seem to get it to work right ...

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

June 04, 2009, 04:46:17 pm #244 Last Edit: June 04, 2009, 04:49:13 pm by Calintz16438
I used the second option that you posted ...

Quote from: Blizzard on October 15, 2008, 09:02:24 am
          interpreter = Interpreter.new(0, false)
         interpreter.setup($data_common_events[C_ID].list, C_ID)
         interpreter.setup_starting_event
         interpreter.update


Keep in mind that this will execute events without "Wait X frames" commands normally. C_ID is the event of the common event you are calling. If you want it to run in the title screen, you would rather need something like this here.

This code goes into "def main" before the "loop" and "Graphics.transition" part.

          @interpreter = Interpreter.new(0, false)
         @interpreter.setup($data_common_events[C_ID].list, C_ID)
         @interpreter.setup_starting_event


This goes into "def update", best right below the line "def update".

          @interpreter.update


I'm not sure if that will work seemlessly, but you can try it out.


**I tried adding the code to your CMS, but of course it didn't work, because I didn't know what I was doing, but I am looking to call a common event from the menu.

Blizzard

Second, that is Equipment. Then you need to add it in "def update_status" under "when 1".
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

June 05, 2009, 04:04:55 am #246 Last Edit: June 05, 2009, 04:06:56 am by Calintz16438
Oh no, my mistake I was unclear ...

I'm gonna make a new option in the menu's index called, "Class."
When I select it, I want it to travel over to the characters status windows like the other ones, so I'm gonna have to disable the menu index, and activate the status index I know. Then, add the new option to the case handler. Is the case handler where I would insert this code??

edit
I think I understand, because the def update_status is the same as the def main, because your def update_status IS the def main for the status window, right? They have the same properties ...

Blizzard

It's the "main" for updating the menu status window, that is when you select which character you want.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

June 05, 2009, 05:20:01 pm #248 Last Edit: June 05, 2009, 08:11:52 pm by Calintz16438
I realized that after your last post. Thank you for clarifying. I will let you know how this turns out.

edit001
Something isn't right ... my common event uses pictures. Are they appearing behind the menu?? If so, is there a way to manually exit the menu screen??

edit002
Nevermind that ... I just used $scene = Scene_Map.new to get out, but for some reason, it isn't working right. It will fade the screen, but pictures don't appear, music won't play, and I can't figure out why ...

here is the code that I edited ...
**This code is from a new project. I wanted to test it plain before I went and started modifying your CMS.
**You will notice the changes in the "def main," and the "def update_status" of course ...
Spoiler: ShowHide
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     menu_index : command cursor's initial position
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0)
   @menu_index = menu_index
 end
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   # Make command window
   s1 = $data_system.words.item
   s2 = $data_system.words.skill
   s3 = $data_system.words.equip
   s4 = "Class"
   s5 = "Status"
   s6 = "Save"
   s7 = "End Game"
   @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
   @command_window.index = @menu_index
   # If number of party members is 0
   if $game_party.actors.size == 0
     # Disable items, skills, equipment, and status
     @command_window.disable_item(0)
     @command_window.disable_item(1)
     @command_window.disable_item(2)
     @command_window.disable_item(3)
     @command_window.disable_item(4)
   end
   # If save is forbidden
   if $game_system.save_disabled
     # Disable save
     @command_window.disable_item(5)
   end
   # Make play time window
   @playtime_window = Window_PlayTime.new
   @playtime_window.x = 0
   @playtime_window.y = 224
   # Make steps window
   @steps_window = Window_Steps.new
   @steps_window.x = 0
   @steps_window.y = 320
   # Make gold window
   @gold_window = Window_Gold.new
   @gold_window.x = 0
   @gold_window.y = 416
   # Make status window
   @status_window = Window_MenuStatus.new
   @status_window.x = 160
   @status_window.y = 0
   # Execute transition
   Graphics.transition
   # Main loop
   loop do
     # Set the Common Event
     @interpreter = Interpreter.new(0, false)
     @interpreter.setup($data_common_events[1].list, 1)
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
     # Abort loop if screen is changed
     if $scene != self
       break
     end
   end
   # Prepare for transition
   Graphics.freeze
   # Dispose of windows
   @command_window.dispose
   @playtime_window.dispose
   @steps_window.dispose
   @gold_window.dispose
   @status_window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @command_window.update
   @playtime_window.update
   @steps_window.update
   @gold_window.update
   @status_window.update
   # If command window is active: call update_command
   if @command_window.active
     update_command
     return
   end
   # If status window is active: call update_status
   if @status_window.active
     update_status
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when command window is active)
 #--------------------------------------------------------------------------
 def update_command
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to map screen
     $scene = Scene_Map.new
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # If command other than save or end game, and party members = 0
     if $game_party.actors.size == 0 and @command_window.index < 4
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Branch by command window cursor position
     case @command_window.index
     when 0  # item
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to item screen
       $scene = Scene_Item.new
     when 1  # skill
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 2  # equipment
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 3  # class
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 4  # status
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 5  # save
       # If saving is forbidden
       if $game_system.save_disabled
         # Play buzzer SE
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to save screen
       $scene = Scene_Save.new
     when 6  # end game
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to end game screen
       $scene = Scene_End.new
     end
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when status window is active)
 #--------------------------------------------------------------------------
 def update_status
   @interpreter.update
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Make command window active
     @command_window.active = true
     @status_window.active = false
     @status_window.index = -1
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Branch by command window cursor position
     case @command_window.index
     when 1  # skill
       # If this actor's action limit is 2 or more
       if $game_party.actors[@status_window.index].restriction >= 2
         # Play buzzer SE
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to skill screen
       $scene = Scene_Skill.new(@status_window.index)
     when 2  # equipment
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to equipment screen
       $scene = Scene_Equip.new(@status_window.index)
     when 3  # class
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Exit the menu
       $scene = Scene_Map.new
       # Switch to class changing screen
       @interpreter.setup_starting_event
     when 4  # status
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to status screen
       $scene = Scene_Status.new(@status_window.index)
     end
     return
   end
 end
end


edit003
Ah ... I remember you saying that the code will not execute the wait commands properly, so I removed all of the wait commands from the event system, and it worked, but without those wait commands ... things flow terribly. Is there anyway I can improve the code pasted above to allow for those wait commands??

Blizzard

You need to use @scene = Scene_Map.new. Also, I already said that events that aren't simply one-time executables might not work properly as they need to be executed more than once in order to be executed properly (i.e. if you have a wait command)
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

Oh, so it actually may not even be possible!?

Blizzard

Of course it is. You simply need to do what I explained before.

Quote from: Blizzard on October 15, 2008, 09:02:24 am
This code goes into "def main" before the "loop" and "Graphics.transition" part.

          @interpreter = Interpreter.new(0, false)
          @interpreter.setup($data_common_events[C_ID].list, C_ID)
          @interpreter.setup_starting_event


This goes into "def update", best right below the line "def update".

          @interpreter.update


I'm not sure if that will work seemlessly, but you can try it out.


You just don't put it in def update, but in def update_WHEREVER_YOU_WANT_IT.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

June 07, 2009, 04:42:46 pm #252 Last Edit: June 07, 2009, 04:58:18 pm by Calintz16438
It doesn't work properly Blizzard.

The wait commands won't execute still, and when I exit the menu normally the common event tries to play. I did just as you instructed here ...

Def Main
Spoiler: ShowHide
  def main
   if BlizzCFG::MAP_BACKGROUND
     @spriteset = Spriteset_Map.new
   elsif BlizzCFG::CMS_EDITION
     @spriteset = Sprite.new
     @spriteset.bitmap = RPG::Cache.picture("CMS/#{BlizzCFG::CMS_EDITION}/CMSFullscreen")
   end
   continue = ((1..BlizzCFG::SAVE_FILES_NUMBER).any? {|i|
       FileTest.exist?("#{BlizzCFG::SAVE_NAME}#{i}.#{BlizzCFG::SAVE_EXTENSION}")})
   @command_window = Window_CMSCommand.new(@menu_index, continue)
   (0...5).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0
   @command_window.disable_item(6) if $game_system.save_disabled
   @command_window.disable_item(7) unless @command_window.continue
   @info_window = Window_CMSInfo.new
   @status_windows, @target_windows = [], []
   $game_party.actors.each {|actor|
       @status_windows.push(Window_CMSMenuStatus.new(actor))}
   @help_window = Window_Help.new
   @help_window.x, @help_window.y, @help_window.z = 0, -368, 9999
   @interpreter = Interpreter.new(0, false)
   @interpreter.setup($data_common_events[7].list, 7)
   @interpreter.setup_starting_event
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     break if @scene != nil || $scene != self
   end
   loop do
     Graphics.update
     (@status_windows + [@command_window, @info_window]).each {|win| win.update}
     move_da_outro
     break if @status_windows[0].x <= - 512
   end
   Graphics.freeze
   (@status_windows + @target_windows + [@command_window, @info_window,
       @help_window, @spriteset]).each {|obj| obj.dispose if obj != nil}
   del_sort if @sort_window != nil
   del_status if @playerstatus_window != nil
   del_equip if @left_window != nil
   del_skill if @skill_window != nil
   del_end if @end_window != nil
   del_items if @item_choose_window != nil
   del_items if @equips_window != nil
   del_options if @options_window != nil
   if @scene.is_a?(Scene_Title)
     Graphics.transition(25)
     Graphics.freeze
   end
   $scene = @scene
 end
 
 def equip_refresh
   if @item_window.active
     item = @item_window.data
     last_hp = @actor.hp
     last_sp = @actor.sp
     @left_window.current = [@actor.maxhp, @actor.maxsp, @actor.atk,
         @actor.pdef, @actor.mdef, @actor.str, @actor.dex, @actor.agi,
         @actor.int, @actor.eva]
     @left_window.changed = @actor.test_equip(@right_window.index, item == nil ? 0 : item.id)
     elements = (item.is_a?(RPG::Weapon) ? item.element_set :
         (item.is_a?(RPG::Armor) ? item.guard_element_set : []))
     states = (item.is_a?(RPG::Weapon) ? item.plus_state_set :
         (item.is_a?(RPG::Armor) ? item.guard_state_set : []))
     @actor.hp = last_hp
     @actor.sp = last_sp
     @left_window.set_new_parameters(elements, states)
   else
     @left_window.current = @left_window.changed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     @left_window.set_new_parameters([], [])
   end
 end
 
 def del_sort
   @sort_window.dispose
   @sort_window = nil
 end
 
 def del_status
   @playerstatus_window.dispose
   @playerstatus_window = nil
 end
 
 def del_equip
   @left_window.dispose
   @right_window.dispose
   @item_windows.each {|win| win.dispose}
   @left_window = @right_window = @item_window = @item_windows = nil
 end
 
 def del_skill
   @skill_window.dispose
   @skill_window = nil
 end
 
 def del_target
   @target_windows.each {|win| win.dispose}
   @target_windows = []
 end

 def del_end
   @end_window.dispose
   @end_window = nil
 end
 
 def del_items
   @items_window1.dispose
   @items_window1 = nil
   @items_window2.dispose
   @items_window2 = nil
   @item_choose_window.dispose
   @item_choose_window = nil
 end
 
 def del_equipment
   @equips_window.dispose
   @equips_window = nil
   del_target
 end
 
 def del_options
   @options_window.dispose
   @options_window = nil
 end


Def Update
Spoiler: ShowHide
  def update
    @interpreter.update
    @status_windows.each {|win| win.update(@actor_index)}
    @target_windows.each {|win| win.update(@target_index)}
    @info_window.update
    unless @status_windows[0].x < 0 || @status_windows[0].dir != 0 ||
        @target_windows[0] != nil && @target_windows[0].dir != 0
      @command_window.update
      [@help_window, @equips_window, @item_choose_window, @sort_window,
      @skill_window, @left_window, @right_window, @playerstatus_window,
      @options_window, @end_window].each {|win| win.update if win != nil}
    end
    move_da_main if @status_windows[0].x < 0
    move_da_selection if @status_windows[0].dir != 0
    move_da_targeting if @target_windows[0] != nil && @target_windows[0].dir != 0
    move_da_status if @playerstatus_window != nil && @playerstatus_window.y > 0
    move_da_equip if @left_window != nil && @left_window.x > 0
    move_da_skill if @skill_window != nil && @skill_window.x < 256
    move_da_target if @target_windows[0] != nil && @target_windows[0].x < 0
    move_da_items if @item_choose_window != nil && @item_choose_window.y < 0
    move_da_sort if @sort_window != nil && @sort_window.y < 64
    move_da_equipment if @equips_window != nil && @equips_window.y < 64
    move_da_options if @options_window != nil && @options_window.y > 0
    move_da_end if @end_window != nil && @end_window.y > 336
    if @moved
      @moved = false
      return
    end
    if @equips_window != nil
      update_equipment
    elsif @command_window.active
      update_command
    elsif @status_windows[0].active
      update_status
    elsif @item_choose_window != nil
      if @item_choose_window.active
        items_refresh
        update_items_choose
      elsif @sort_window != nil && @sort_window.active
        update_sort
      elsif @items_window1 != nil && @items_window1.active
        @items_window1.update
        update_item
      elsif @items_window2 != nil && @items_window2.active
        @items_window2.update
        update_item
      elsif @target_windows[0] != nil && @target_windows[0].active
        update_item_target
      end
    elsif @skill_window != nil && @skill_window.active
      update_skill
    elsif @target_windows[0] != nil && @target_windows[0].active
      update_skill_target
    elsif @right_window != nil
      if @right_window.active
        update_right_equip
      elsif @item_window != nil && @item_window.active
        @item_window.update
        update_eitem
      end
    elsif @playerstatus_window != nil && @playerstatus_window.active
      update_playerstatus
    elsif @options_window != nil && @options_window.active
      update_options
    elsif @end_window != nil
      update_end
    end
  end
 
  def move_windows(wins, border, mdiff, lead, xy, acc = false)
    if acc
      diff = [[((xy ? lead.x : lead.y)-border).abs, mdiff].min, 1].max
    else
      diff = [[((xy ? lead.x : lead.y)-border).abs/2, mdiff].min, 1].max
    end
    wins[0].each {|win| win.x += diff if win != nil}
    wins[1].each {|win| win.x -= diff if win != nil}
    wins[2].each {|win| win.y += diff if win != nil}
    wins[3].each {|win| win.y -= diff if win != nil}
    @moved = true
  end
 
  def move_da_main
    lead = @status_windows[0]
    x_plus = @status_windows
    x_minus = [@command_window]
    y_minus = [@info_window]
    move_windows([x_plus, x_minus, [], y_minus], 0, 128, lead, true)
  end
 
  def move_da_outro
    @flag = true
    lead = @status_windows[0]
    x_plus = [@command_window]
    x_minus = @status_windows + @target_windows + [@skill_window, @help_window]
    y_plus = [@info_window]
    y_minus = [@item_choose_window, @items_window1, @items_window2, @help_window]
    move_windows([x_plus, x_minus, y_plus, y_minus], 0, 128, lead, true, true)
  end
 
  def move_da_selection(lead = @status_windows[@actor_index])
    if lead.dir == 1
      move_windows([[], [], [], @status_windows], 360, 32, lead, false)
    else
      move_windows([[], [], @status_windows, []], 0, 32, lead, false)
    end
  end
 
  def move_da_targeting(lead = @target_windows[@target_index])
    if lead.dir == 1
      move_windows([[], [], [], @target_windows], 376, 32, lead, false)
    else
      move_windows([[], [], @target_windows, []], 64, 32, lead, false)
    end
  end
 
  def move_da_sort(win = @sort_window)
    move_windows([[], [], [win], []], 64, 32, win, false)
  end
 
  def move_da_status(win = @playerstatus_window)
    move_windows([[], [], [], [win]], 0, 64, win, false)
  end

  def move_da_equip(win = @left_window)
    x_minus = [@left_window, @right_window, @help_window] + @item_windows
    move_windows([[], x_minus, [], []], 0, 64, win, true)
  end 
   
  def move_da_skill(win = @skill_window)
    x_plus = [@skill_window, @help_window]
    move_windows([x_plus, [], [], []], 256, 64, win, true)
  end
 
  def move_da_target(win = @target_windows[0])
    move_windows([@target_windows, [], [], []], 0, 32, win, true)
  end
 
  def move_da_items(win = @item_choose_window)
    y_plus = [@item_choose_window, @items_window1, @items_window2, @help_window]
    move_windows([[], [], y_plus, []], 0, 64, win, false)
  end
 
  def move_da_equipment(win = @equips_window)
    y_plus = [@equips_window, @help_window]
    move_windows([[], [], y_plus, []], 64, 64, win, false)
  end
 
  def move_da_options(win = @options_window)
    move_windows([[], [], [], [win]], 0, 64, win, false)
  end
 
  def move_da_end(win = @end_window)
    move_windows([[], [], [], [win]], 336, 64, win, false)
  end
 
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.actors.size == 0 && @command_window.index < 5
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        if BlizzCFG::CUSTOM_ITEM_SCENE
          @scene = Scene_Item.new
        else
          @item_choose_window = Window_CMSChooseItem.new
          @items_window1 = Window_NormalItem.new
          @items_window2 = Window_QuestItem.new
          @items_window1.help_window = @items_window2.help_window = @help_window
          @command_window.active = false
          @help_window.x, @help_window.y = 0, -576
          @help_window.set_text('')
          @help_window.visible = false
          items_refresh
        end
      when 1..4
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_windows.each {|win| win.active = true}
        @actor_index = 0
      when 5
        $game_system.se_play($data_system.decision_se)
        if BlizzCFG::CUSTOM_OPTIONS_SCENE
          @scene = Scene_Options.new
        else
          @scene = Scene_Map.new
          #@options_window = Window_CMSOptions.new
          #@command_window.active = false
        end
      when 6
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
        else
          $game_system.se_play($data_system.decision_se)
          @scene = Scene_CMSSave.new
          Graphics.transition(0)
        end
      when 7
        if @command_window.continue
          $game_system.se_play($data_system.decision_se)
          @scene = Scene_CMSLoad.new
          Graphics.transition(0)
        else
          $game_system.se_play($data_system.buzzer_se)
        end
      when 8
        $game_system.se_play($data_system.decision_se)
        if BlizzCFG::CUSTOM_END_SCENE
          @scene = Scene_End.new
        else
          @command_window.active = false
          @end_window = Window_CMSEndCommand.new
        end
      end
     
    end
  end

Blizzard

Look, I can't read minds. If you don't tell me where you actually want that common event to run, I can't tell you where exactly you need to put it.
And I can't find the line saying "@interpreter.update" anywhere.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

June 07, 2009, 05:00:41 pm #254 Last Edit: June 07, 2009, 05:02:42 pm by Calintz16438
I apologize about the @interpreter.update thing. I didn't copy the right part of the code.

Regardless, the @interpreter.update is located directly below the Def Update line as you suggested it be best placed. I have fixed the spoiler to show it.

For now, I commented the options lines to test this, and put @scene = Scene_Map.new in it's place. This is also in the spoiler. So look for "when 5" in the def update for where I want this.

Blizzard

No, I didn't say to put it below def update, I said to put it below def update_SOMETHING. If you want it to run when you select the "Options" command, then you put it in def update_options.

BUT! As you seem to want to call the event when returning to the map (which you should have told me since that works differently, all you need to do is to add this command before "@scene = Scene_Map.new":

$game_temp.common_event_id = X


X is the common event you want to run on map entry. So you have this code:

$game_temp.common_event_id = 7
@scene = Scene_Map.new


When you select the "Options" command.

Don't forget to remove the three lines you put in def main.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

June 07, 2009, 05:13:58 pm #256 Last Edit: June 07, 2009, 05:16:47 pm by Calintz16438
No, I don't want to run it from the map, but I thought that that would be the only way it would work. So, you're telling me that if I put it in it's proper scene's update method, then it should work properly?? Okay, let me try that ...

Edit
Does the fact that I don't have a scene for it pose a problem, because the common event IS the scene itself. I was planning on just adding an extra selection to the main menu that upon selection will call the common event.

Blizzard

You're complicating things too much if the common event is a scene. But then again, if it is a scene, simply activate it, return to the map and it will run.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

June 07, 2009, 05:31:31 pm #258 Last Edit: June 07, 2009, 05:40:06 pm by Calintz16438
Either we just can't get on the same page, or I'm a retard, Lol, but this is the best I can explain what I am doing with this common event.

I have created a Class Changing System with events that allows the player to switch his character's class and preview the changes and all that good stuff. It's in common event form and utilizes roughly 25pictures during operation. I have assigned special functions to the left, right, down, and up arrow keys.

I want to call this common event from the menu, from it's own option. It will be right under the "Bag," so it will be option 2 in the main menu. It's suppose to run when you select it from the menu. I don't know if I need to return to the map or not for this.

**The common event isn't a $scene
**I don't wanna have to return to the map if I don't have to.


Edit
Scratch it ... I will just use what you've posted.

Pm6583

Hi

Is there anyway that i could add the Party switcher  window by blizzard and the limit break menu by DerVVulfman
into the menu because this menu is ideal for my game but i am also using those scripts.

I just wanted to ask first before i fiddle with the script and make it go wrong lol

is there anyway to do this
Centra Rise of Tiamut



In production.

Destiny's are created to be fulfilled, Just like proficies