じ☆ve冰风 发表于 2026-7-27 15:18:41

Faalco GS Pack - HUD


http://i.imgur.com/3Lgpp.png




Logo by GabrielForan











Compatible with: VXAce

Compatibility: Great

Ease of use: Easy

Lag Generated: Null











Conditions of Use





Can be modified to taste, since they have the proper credits to me (Faalco)

disclosure of those scripts and place permitted provided that due credit.












Script




################################################
# Faalco GS Pack - {HUD} 12 - 02 - 2012                                                       #
# by Faalco                                                                                                                                                   #
################################################
class HUD < Sprite
################################################
# Starting                                                                                                                                                          #
################################################
def initialize(view)
    super(view)

################################################
# Creating color of HUD                                                                                                          #
################################################
    @ch1 = Color.new(50,0,0)
    @ch2 = Color.new(222,26,50)
    @cm1 = Color.new(50,60,60)
    @cm2 = Color.new(0,240,50)
    @back = Color.new(0,0,0)
    @back2 = Color.new(240,240,80)
    #Cria o Bitmap
    self.bitmap = Bitmap.new(200,200)
    self.bitmap.font.name = "UmePlus Gothic"
    self.bitmap.font.size = 20
    self.z = 300
    update
end
#################################################
# Updating                                                                                                                                                           #
#################################################
def update
    super

#################################################
# Deleting content                                                                                                                                   #
#################################################
    self.bitmap.clear
#################################################
# Creating HP bar                                                                                                                                  #
#################################################
    hp = $game_actors.hp
    mhp = $game_actors.mhp
    wb = 116 * hp / mhp
    self.bitmap.fill_rect(10, 10, 120, 10, @back)
    self.bitmap.fill_rect(11, 11, 118, 8, @back2)
    self.bitmap.fill_rect(12, 12, 116, 6, @back)
    self.bitmap.gradient_fill_rect(12, 12, wb, 6, @ch1, @ch2)
    self.bitmap.draw_text(60, 0, 200, 24, "HP")
#################################################
# Creating MP bar                                                                                                                                  #
#################################################
    mp = $game_actors.mp
    mmp = $game_actors.mmp
    wb = 116 * mp / mmp
    self.bitmap.fill_rect(10, 30, 120, 10, @back)
    self.bitmap.fill_rect(11, 31, 118, 8, @back2)
    self.bitmap.fill_rect(12, 32, 116, 6, @back)
    self.bitmap.gradient_fill_rect(12, 32, wb, 6, @cm1, @cm2)
    self.bitmap.draw_text(60, 20, 200, 24, "MP")
end

def dispose
    self.bitmap.dispose
    super
end
end
#################################################
# Installing HUD                                                                                                                                           #
#################################################
class Spriteset_Map
alias
r_initialize :initialize
def initialize
    @hud = HUD.new(@viewport2)
    or_initialize
end
alias
r_update :update
def update
    @hud.update if Graphics.frame_count % 5 == 1
    or_update
end
alias
r_dispose :dispose
def dispose
    @hud.dispose
    or_dispose
end
end
###################################################
# END OF THE SCRIPT                                                                                                                               #
###################################################

                Code:       









Screens





Spoiler
http://s15.postimage.org/ll2gea28b/HUD.png


















Download





Not required.

















Credits & Thanks





Khas - Her classes were very useful.

Raizen - Study and help scripts of the script.

Faalco - By creating the scripts.





本贴来自国际rpgmaker官方论坛作者:Takkun处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/faalco-gs-pack-hud.2030/
页: [1]
查看完整版本: Faalco GS Pack - HUD