Invité Invité
| Sujet: [VX] Barre de vie des peros sur la map Mer 24 Aoû 2011 - 10:09 | |
| Auteur: niel17 A placer au dessus de main Script: - Code:
-
############################################ ########### 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::Switch_q_Ativa_O_script] == true if @show == true @hud.visible = true elsif @show == false @hud.visible = false end else @hud.visible = false end end end |
|
Teraglehn Ancien staffeux
Messages postés : 3628 Date d'inscription : 23/09/2010 Jauge LPC :
| Sujet: Re: [VX] Barre de vie des peros sur la map Mer 24 Aoû 2011 - 10:23 | |
| Merci c'est exactement ce que je cherchais ! (par contre il faut des graphiques qui n'y sont pas non ?) |
|
Invité Invité
| Sujet: Re: [VX] Barre de vie des peros sur la map Mer 24 Aoû 2011 - 10:38 | |
| La démo est HS alors il va falloir les créer toi même. ^^ |
|
Teraglehn Ancien staffeux
Messages postés : 3628 Date d'inscription : 23/09/2010 Jauge LPC :
| Sujet: Re: [VX] Barre de vie des peros sur la map Mer 24 Aoû 2011 - 10:43 | |
| faut créer quoi exactement ? |
|
Invité Invité
| Sujet: Re: [VX] Barre de vie des peros sur la map Mer 24 Aoû 2011 - 15:21 | |
| Barra_HP = "HP-Bar" # Image de la barre des HP Barra_MP = "MP-Bar" # Image de la barre des MP Tu as ta réponse. |
|
Teraglehn Ancien staffeux
Messages postés : 3628 Date d'inscription : 23/09/2010 Jauge LPC :
| Sujet: Re: [VX] Barre de vie des peros sur la map Mer 24 Aoû 2011 - 16:40 | |
| ok, mais eu au niveau de la taille et du format, tu sais s'il supporte les gif ? et quel est la longueur de la barre ? |
|
Invité Invité
| Sujet: Re: [VX] Barre de vie des peros sur la map Mer 24 Aoû 2011 - 21:09 | |
| Je pense que ce sera du PNG, après tu peux essayé en JPEG pour gratter un peu plus de place, mais je dirais PNG sûr. |
|
Contenu sponsorisé
| Sujet: Re: [VX] Barre de vie des peros sur la map | |
| |
|