Jump to content
New account registrations are disabed. This website is now an archive. Read more here.

Recommended Posts

i dont know if can call it advanced lol

but i edited a gold hud script

i changed the "G" to an icon

 

SCREENSHOT:

0oNTSIv.png

just add an icon named "gold" to the graphics/icons

here is an example:

http://i.imgur.com/hl1eGNz.png

here is the script: (if any problems persist, please just reply i'll try to fix it even thou i'm not a script builder)

 

 

module Gold_Window
  # Window's horizontal position
  WINDOW_X = 0
  # Window's vertical position
  WINDOW_Y = 420
  # Window's width
  WINDOW_WIDTH = 160
  # Window's height
  WINDOW_HEIGHT = 64
  # Default hide status of the window (true = hidden, false = visible)
  DEFAULT_HIDE = false
  
  @hide = DEFAULT_HIDE
  def self.hidden?
    return @hide
  end
  def self.hide
    @hide = !@hide
  end
end
#==============================================================================
# ** Window_Gold_HUD
#------------------------------------------------------------------------------
#  This window displays amount of gold.
#==============================================================================
class Window_Gold_HUD < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Gold graphic 
#--------------------------------------------------------------------------
def draw_gold_pic(actor, x, y)
bitmap = RPG::Cache.picture("gold")
sw = bitmap.width
sh = bitmap.height
src_rect = Rect.new(0, 0, sw, sh)
self.contents.blt(x, y, bitmap, src_rect)
end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    if @old_gold != $game_party.gold || @old_hide != Gold_Window.hidden?
      self.contents.clear
      self.opacity = Gold_Window.hidden? ? 0 : 150
      @text_opacity = Gold_Window.hidden? ? 0 : 255
      cx = contents.text_size($data_system.words.gold).width
      draw_gold_pic(@actor, 112, 10) 
      self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
      @old_gold = $game_party.gold
      @old_hide = Gold_Window.hidden?
    end
  end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  alias gold_hud_main main
  def main
    @gold_window = Window_Gold_HUD.new
    gold_hud_main
    @gold_window.dispose    
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias gold_hud_update update
  def update
    @gold_window.refresh
    gold_hud_update
  end
end
Edited by aldrinbulajr

Share this post


Link to post
Share on other sites

You just took what i made in http://www.gdunlimited.net/scripts/rpg-maker-xp/misc-system/gold-display-image and added it to some one's gold hud. And don't say you didn't because i can tell, you used the same faulty positioning i put in script when i used a crappy image.

 

Besides that this won't even work in the menu or shop menu unlike the one I posted that replaces Gold_Window. This script only puts the hud on the main screen.

 

Next time put credits for people's work you take or modify. Who made the hud?

Share this post


Link to post
Share on other sites

I didn't say he couldn't do it I just said he should give credit to the people who he took the stuff from instead of claiming it as his own.

Share this post


Link to post
Share on other sites

by credits i mean acknowledgement of who did what. Just a line at the top of your post saying the hud was made by so and so, and part of the code was taken from so and so's script.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...