HUD MVR [Rpg Maker XP]

OP

SGITC

¡Feliz Cumpleaños!
Mensajes
790
Reacciones
155
Puntos
0
Ubicación
Venezuela
Hola amigos Makeros, en esta ocasion les dejo una HUD simple, pero bonita.

No es la gran cosa, pero si quieren algo simple, pero bien hecho. Aqui se los dejo:


#==============================================================================
# Hud MVR
#
# By : Yllua
#==============================================================================
class Hud < Window_Base
def initialize
super(10,10,170,100)
self.contents = Bitmap.new(width - 32, height - 32)
@ator = 0
refresh
end

def refresh
self.contents.clear
actor = $game_party.actors[0]
#Conteúdo:
draw_actor_hp_bar_1(actor, -30, -20)
draw_actor_sp_bar_1(actor, -30, 10)
draw_actor_hp(actor, -2, -7, width = 144)
draw_actor_sp(actor, -2, 15, width = 144)
#Fim

if $scene.is_a?(Scene_Menu)
self.contents.clear
end
if $scene.is_a?(Scene_Battle)
self.contents.clear
self.visible = false
end
end
end
#Adiciona a janela a o mapa.
class Scene_Map
alias hud_main main
def main
@Hud = Hud.new
hud_main
@Hud.dispose
end
alias hud_update update
def update
hud_update
@Hud.update
@Hud.refresh
end
end

class Window_Base < Window
def draw_actor_hp_bar_1(actor, x, y)
back = RPG::Cache.picture("Barra_Fundo")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, back, src_rect)
meter = RPG::Cache.picture("Barra_Hp")
cw = meter.width * actor.hp / actor.maxhp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
end

def draw_actor_sp_bar_1(actor, x, y)
back = RPG::Cache.picture("Barra_Fundo")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, back, src_rect)
meter = RPG::Cache.picture("Barra_Sp")
cw = meter.width * actor.sp / actor.maxsp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
end
end

Plataforma: Rpg Maker XP
Autor: Yllua

~Disfrutenlo
 

YoshiGM

Iconic User
Mensajes
667
Reacciones
16
Puntos
578
Ubicación
Detrás Tuyo (?)
Pero qué es lo que hace el script ???
 
OP

SGITC

¡Feliz Cumpleaños!
Mensajes
790
Reacciones
155
Puntos
0
Ubicación
Venezuela
reo que es un HUD, no hay imagenes asique lo probare haber si me sirve :D
¿Funciona solo en ARPG's o tambien en RPG normales?
Salu2

Donde sea como sea. Aunque no se si produce incompatibilidad con algun script de ARPG como XAS

Pero qué es lo que hace el script ???

Amigo, una Hud es como una interfaz que muestra tu HP y MP mediante barras, claro que puede tener mas detalles como la HUD del XAS. Espero te haya resuelto tu duda ;)
 
Arriba Pie