The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: kathis on February 08, 2007, 06:17:13 AM

Title: HUD with JUST gold
Post by: kathis on February 08, 2007, 06:17:13 AM
Just gold HUD
Version: there is a version to this >.>?

Introduction

I know there are Hubs out there that are like this but this is really the few few scripts I manage to do with no screw ups and it works. >.> yes I modified a pre working hub with lots of stuff to it. Thanks to random Huds I looked at. and trust me a few things just didn't click in XD

Don't give me creidt if you use. >.> I seriously don't deserve it since its just modifications. But you can thank me and complaint me and give me a cookie for my good work..yes....cookies are lovely.


Features


Screenshots

uhh I really don't want to post screenshots >.>

(either links, or SPOILER and IMG tags)

Demo

why would I have a demo >.>

Script

class Window < Window_Base
  def initialize
    super(0, 0, 160, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity = 145 #Change to 0 if you use a picture
    refresh
  end
  def refresh
    self.contents.clear

    # Displays Gold
        cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
    end
  def update
    super
    refresh
  end
end


class Scene_Map
  alias hud_main main
  alias hud_update update
  def main
    @hud = Window.new
    hud_main
    @hud.dispose
  end
  def update
    @hud.update
    hud_update
  end
end

Instructions

same old same old just place over main

Compatibility

I really don't know all the compatibilities that there are that wouldn't work with this >.<

Credits and Thanks


Author's Notes

if you want to MOVE where the HUD is displayed go line 3 and change the numbers

Quotesuper(0, 0, 160, 60)

First number = X postion
Second number = Y postion
Third number = width
forth number = hight

Enjoy ((ps I still need to learn how to make Varibles number that can be changed with events to be displayed. Please and thank you Hence my requested HUD I need to figure out the correct code that does it. Yes disecting code is fun and educational :D ))