hud script request

● ARCHIVED · READ-ONLY
Started by Krishna Siva 7 posts View original ↗
  1. hello everyone!

    I am making a script request for a very simple hud that show HP & money

    that can be activated &  deactivated by a switch.

    I ravaged the whole forum but didn't get a hud like this.

    I want it for a life sim game. 

    I want it to be like this:

    Townsman Capture.PNG

    Can anyone please make something like this?

    very thank you in advance.
  2. I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.


    Is that your leader's HP, Actor 1's HP? Or do you only have one PC in your game?
  3. You'd have to tell us whether you're using a variable for your actor's hp or your Actor's HP (Leader or specific actor). When you tell us so, I can definitely promise I'd do the script for you.
  4. it's the actor's hp, not variables and it's only one man.
  5. Does this work for you?

    Spoiler
    Code:
    module KrishGM  # X and Y change the position.  X = 0  Y = 0    # This determines how see through the window is.  Opacity = 100 # Out of 255    # This is your Switch ID, and what it starts out as (on = true, off = false).  Switch = 1  SwitchDefault = true # true or falseendclass Window_KrimHUD < Window_Base  include KrishGM  def initialize    super(X, Y, 140, fitting_height(2))    @cleared = false    self.opacity = Opacity    refresh  end    def changed?    return true unless $game_player.actor    return true if @hp != $game_player.actor.hp    return true if @gold != $game_party.gold    return false  end    def update    super    self.visible = $game_switches[Switch]    refresh if changed?  end    def refresh    if $game_player.actor.nil?      contents.clear if !@cleared      return @cleared = true    end    @cleared = false    self.contents.clear    @hp = $game_player.actor.hp    @gold = $game_party.gold    draw_actor_hp($game_player.actor, 0, 0, [124, contents.width].min)    draw_currency_value(@gold, Vocab::currency_unit, 4, line_height, contents.width - 8)  endendclass Scene_Map  alias start_krishgm_status_hud start  def start    start_krishgm_status_hud    @window_krim_hud = Window_KrimHUD.new  endendclass Game_Switches  alias init_krishgm_hud_switch initialize  def initialize(*argv)    init_krishgm_hud_switch(*argv)    @data[KrishGM::Switch] = KrishGM::SwitchDefault  endend
  6. FenixFyreX said:
    Does this work for you?

    Spoiler
    module KrishGM # X and Y change the position. X = 0 Y = 0 # This determines how see through the window is. Opacity = 100 # Out of 255 # This is your Switch ID, and what it starts out as (on = true, off = false). Switch = 1 SwitchDefault = true # true or falseendclass Window_KrimHUD < Window_Base include KrishGM def initialize super(X, Y, 140, fitting_height(2)) @cleared = false self.opacity = Opacity refresh end def changed? return true unless $game_player.actor return true if @hp != $game_player.actor.hp return true if @gold != $game_party.gold return false end def update super self.visible = $game_switches[Switch] refresh if changed? end def refresh if $game_player.actor.nil? contents.clear if !@cleared return @cleared = true end @cleared = false self.contents.clear @hp = $game_player.actor.hp @gold = $game_party.gold draw_actor_hp($game_player.actor, 0, 0, [124, contents.width].min) draw_currency_value(@gold, Vocab::currency_unit, 4, line_height, contents.width - 8) endendclass Scene_Map alias start_krishgm_status_hud start def start start_krishgm_status_hud @window_krim_hud = Window_KrimHUD.new endendclass Game_Switches alias init_krishgm_hud_switch initialize def initialize(*argv) init_krishgm_hud_switch(*argv) @data[KrishGM::Switch] = KrishGM::SwitchDefault endend
    I tried, and it worked fine.
  7. Thanks fenixfyrex