HUD simples que mostra: HP/MP, Nome,Classe e LV do herói principal.
Screen:
Script:
Screen:
Script:
- Spoiler:
- Código:
#Joaovitor2763-HUD
#HUD simples, que mostra: HP/MP/Nome e Classe do heroi.
#Observação apenas para um player.
#Os icones de HP/MP podem ser editados
class Window_HUD < Window_Base
def initialize(actor = $game_party.members[0])
super(0, 0, 316, 95)
self.opacity = 255
@actor = actor
@actor_id = @actor.index
refresh
end
def refresh
self.contents.clear
#Edite aqui para mudar os icones de HP/MP
draw_icon(101, 15, 10)#mude o 101 para o icone desejado
draw_icon(100, 15, 39)#mude o 100 para o icone desejado
#Fim da troca de icones
draw_actor_hp(@actor, 53, 7)
draw_actor_mp(@actor, 53, 34)
draw_actor_name(@actor, 228, 2)
draw_actor_class(@actor, 228, 21)
draw_actor_level(@actor, 228, 42)
#Defina switch que liga e desliga HUD
self.visible = $game_switches[2]#por padrão a Switch e a 2
end
end
#Fim das edições
class Scene_Map
alias window2136_start start unless $@
def start(*args)
window2136_start(*args)
@window2136 = Window_HUD.new
end
alias window2137_update update unless $@
def update(*args)
window2137_update(*args)
@window2136.refresh
end
alias window2138_terminate terminate unless $@
def terminate(*args)
@window2136.dispose
window2138_terminate(*args)
end
end