Cerca nel Forum
Showing results for tags 'HUD Personalizzato'.
Trovato 1 risultato
-
Nome Script: HUD Personalizzato Versione: 2.0 Autore/i: Shepher Informazioni: Crea un HUD personalizzato... Istruzioni: Inserite lo script sotto Material e importate le immagini contenute nella demo nel vostro progetto. Script: ############################################ ########### HUD - HP SP LVL ################ ############# By : Shepher ################# ########### Agradecimentos ################# ############# FlyBoyUnder ################## ############################################ ################################################ # Instruções do script : # # Apenas cole acima do Main e jogue ^^ # # Para trocar a opacidade vá na linha 24 # # Dica: Não altere o tamanho da janela # ################################################ ############################################################# # INICIO DO SCRIPT # ##################### By Shepher ############################ module Shepher_HUD Barra_HP = "HP-Bar" # Imagem da barra de HP Barra_MP = "MP-Bar" # Imagem da barra de MP Base = "Bars-Base" # Imagm do fundo das barras Switch_q_Ativa_O_Script = 10 # Switch que ativa / desativa a HUD Opacidade = 0 # Opacidade da janela | Recomendo 0 Ativar_Botao = Input::R Mostrar_Face = false # Mostrar a face ou não true/false # Recomendo deixar false, pois pode dar mto lag end class Window_Teste < Window_Base def initialize super(0, 0,544, 120) #280,120 self.opacity = (Shepher_HUD::Opacidade) @actor = $game_party.members[0] @actor2 = $game_party.members[1] @actor3 = $game_party.members[2] @actor4 = $game_party.members[3] self.contents.font.color = Color.new(255,0,0,0) end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def update self.contents.clear if Shepher_HUD::Mostrar_Face == true draw_hp(@actor, 70, 40) draw_mp(@actor, 70, 64) show_state(@actor, 130, 0) @item_max = $game_party.members.size for actor in $game_party.members draw_actor_face(actor, 2, actor.index * 96 + 2, 92) x = 40 y = actor.index * 96 + WLH / 2 draw_actor_name(actor, x, y) draw_actor_level(actor, 136, y) end end if Shepher_HUD::Mostrar_Face == false draw_hp(@actor, 0, 35) draw_mp(@actor, 0, 59) draw_hp(@actor2,130,35) draw_mp(@actor2,130,59) draw_hp(@actor3,260,35) draw_mp(@actor3,260,59) draw_hp(@actor4,390,35) draw_mp(@actor4,390,59) show_state(@actor, 130, 0) @item_max = $game_party.members.size for actor in $game_party.members x = 0 y = actor.index * 96 + WLH / 2 x2 = 130 self.contents.font.color = Color.new(255,0,0,0) draw_actor_name(actor, x, y) draw_actor_name(@actor2,x2,y) draw_actor_name(@actor3,260,y) draw_actor_name(@actor4,390,y) end end end def show_state(actor, x, y) count = 0 for state in actor.states draw_icon(state.icon_index, x, y + 24 * count) count += 1 break if (24 * count > 76) end end def draw_hp(actor, x, y) back = Cache.system(Shepher_HUD::Base) cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x, y-ch+24, back, src_rect) meter = Cache.system(Shepher_HUD::Barra_HP) cw = meter.width * actor.hp / actor.maxhp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x+5, y-ch+17, meter, src_rect) end def draw_mp(actor, x, y) back = Cache.system(Shepher_HUD::Base) cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x, y-ch+24, back, src_rect) meter = Cache.system(Shepher_HUD::Barra_MP) cw = meter.width * actor.mp / actor.maxmp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x+5, y-ch+17, meter, src_rect) end end ############################################################# # Fim do Script # ######################### By Shepher ######################## class Scene_Map alias shepher_hud_shepher_start start alias shepher_hud_shepher_update update alias shepher_hud_shepher_terminate terminate def start shepher_hud_shepher_start @show = true @hud = Window_Teste.new end def update shepher_hud_shepher_update @hud.update showing_hud end def terminate shepher_hud_shepher_terminate @hud.dispose end def showing_hud if Input.trigger?(Shepher_HUD::Ativar_Botao) if @show == true @show = false else @show = true end end if Shepher_HUD::Switch_q_Ativa_O_Script == 0 or $game_switches[Shepher_HUD] == true if @show == true @hud.visible = true elsif @show == false @hud.visible = false end else @hud.visible = false end end end Demo: http://www.mediafire.com/?sharekey=11d6977360083ebe00d27174b47c6657224eabca47fe4d38f7e866bfb1230ce0