The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: &&&&&&&&&&&&& on June 18, 2013, 07:04:11 AM

Title: (RMVXA) pop_window.hpt
Post by: &&&&&&&&&&&&& on June 18, 2013, 07:04:11 AM
This is what I have far as this moment. I'm using "SceneManager.call(Scene_Menu)".

Code: [Select]
#--------------------------
# This does stuff, I think.
#--------------------------

class Window_Popup < Window_Base
  #--------------------------------------------------------------------------
  # Main screen turn on
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, window_width, fitting_height(1))
    self.windowskin = Cache.system("MenuWindow1")
    refresh
  end
  #--------------------------------------------------------------------------
  # How whide is it?
  #--------------------------------------------------------------------------
  def window_width
    return 160
  end
  #--------------------------------------------------------------------------
  # refreshments
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    process_draw_icon(1, 300)
  end
  #--------------------------------------------------------------------------
  # don't know what to put here...
  #--------------------------------------------------------------------------
  def process_draw_icon(icon_index, pos)
    draw_icon(icon_index, pos[24], pos[24])
  end
  #--------------------------------------------------------------------------
  # idkmybffjill
  #--------------------------------------------------------------------------
  def open
    refresh
    super
  end
end

Code: [Select]
  #-----------------
  #This pops things ups dawg
  #-----------------

class Scene_Popup < Scene_Base
  def start
    super
    create_popup_window
  end
  #-----
  def terminate
    super
    dispose_background
  end
  #-----
  def create_popup_window
    @popup_window = Window_Popup.new
    @popup_window.x = 0
    @popup_window.y = Graphics.height - @popup_window.height
   
  end
end

Now I just need to fiqure out how to change the "1" in "process_draw_icon(1, 300)" to something I can change with events.

Along those lines, how do I add a ingame variable to a script? Is it something like "Print v[1]" or am I way off?

EDIT: Tried "print $game_actors[$game_variables[10]]", that didn't go well. .__.
Title: Re: (RMVXA) pop_window.hpt
Post by: D&P3 on June 18, 2013, 12:40:03 PM
If you called "print $game_actors[$game_variables[10]]"
before the game even started up then that's your problem.

Otherwise that is correct.