troma samada Membre
Nombre de messages : 9 Age : 40 Votre niveau sur RPG Maker : bon Date d'inscription : 03/04/2008
Mes points RPG's Points: (9/1000)
| Sujet: Re: Script ABS [Suprimé l'interface pour les scenes] 09/04/08, 06:57 am | |
| Bon alors j'ai trouver 2 solutions, don une que je n'arive pas a faire marcherXD La premiere (celle que j'arrive pas a faire marcher): Fermer un script grace a un interrupteur: - Code:
-
module xxx WM_SWITCH_VIS_DISABLE = 1 end Le chiffre 1 est l'ID de l'interrupteur, ce bout de code fermerais soi disant le script sur lequel il est placé. Reste savoir ou comment et quand le placé et surtous son incompatibilité avec certain script ou bug present. La 2em solution (qui marche): Viré le script HUD et le remplacé par celui la: - Code:
-
#============================================================= # *** Silent's HUD # ** Version - 1.1 RMVX # * Fecha - 28/01/08 DD/MM/YY Version 1.1 -> 07/02/08 #----------------------------------------------------------------------------# # * Descripcion - Simple HUD que muestra el HP, mp, EXP y nombre del jugador # principal en el mapa, ideal para ARPGs # # * Placer le script au dessus du script Main. # # * lalala # # >*< 0; Haut gauche 1; Haut droite 2; Bas gauche 3; Bas droite #============================================================================#
LUGAR = 0 # Position des barres >*<
HUD_BAR_HP = true # Montrer barre HP
HUD_BAR_MP = true # Montrer Barre MP
HUD_BAR_EP = true # Montrer barre EXP
ON_OFF_SWITCH = 20 # Numéros interrupteur
#============================================================================# # ** Window_HUD # - Ventana donde se muestra la info en el mapa #============================================================================# class Window_HUD < Window_Base #--------------------------------------------------------------------------# # * Metodo Initialize #--------------------------------------------------------------------------# def initialize super(0, 0, 280, 160) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 refresh end #--------------------------------------------------------------------------# # * Refresh #--------------------------------------------------------------------------# def refresh actor = $game_actors[1] self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 110-2, 22, $game_actors[1].name, 2) draw_hud_actor_hp(actor, 30, 20) if HUD_BAR_HP == true draw_hud_actor_mp(actor, 30, 50) if HUD_BAR_MP == true draw_hud_actor_exp(actor, 30, 80) if HUD_BAR_EP == true end end #============================================================================# # ** Scene_Map alias # - alias a Scene_Map con metodos del HUD #============================================================================# class Scene_Map alias hud_main main alias hud_update update alias hud_terminate terminate #--------------------------------------------------------------------------# # * Metodo Principal #--------------------------------------------------------------------------# def main @lalalah = $game_actors[1].hp @lalalas = $game_actors[1].mp @lalalae = $game_actors[1].exp @hud = Window_HUD.new case LUGAR when 0 @hud.y = 0 @hud.x = 0 when 1 @hud.y = 280 @hud.x = 0 when 2 @hud.y = 0 @hud.x = 340 when 3 @hud.y = 280 @hud.x = 340 end @hud.visible = false hud_main end #--------------------------------------------------------------------------# # * Update #--------------------------------------------------------------------------# def update if $game_switches[ON_OFF_SWITCH] == true @hud.visible = true $game_map.refresh else @hud.visible = false $game_map.refresh end if $game_switches[ON_OFF_SWITCH] == true if $game_actors[1].hp != @lalalah and HUD_BAR_HP == true @hud.refresh @lalalah = $game_actors[1].hp @hud.update end if $game_actors[1].mp != @lalalas and HUD_BAR_MP == true @hud.refresh @lalalas = $game_actors[1].mp @hud.update end if $game_actors[1].exp != @lalalae and HUD_BAR_EP == true @hud.refresh @lalalae = $game_actors[1].exp @hud.update end end hud_update end #--------------------------------------------------------------------------# # * Terminate #--------------------------------------------------------------------------# def terminate @hud.dispose hud_terminate end end #============================================================================# # ** Adiciones a Window_Base # - Metodo de dibujado de barra de exp, hp y mp #============================================================================# class Window_Base < Window #--------------------------------------------------------------------------# # * Metodo de dibujado de la barra de hp #--------------------------------------------------------------------------# def draw_hp_bar(actor, x, y) hpwidth = (actor.hp * 10) / actor.maxhp * 12 * (1) self.contents.fill_rect(x + 0, y + 0, 1 * 120 + 4, 14, Color.new(0, 0, 0, 100)) self.contents.fill_rect(x + 1, y + 1, 1 * 120 + 2, 12, Color.new(255, 255, 255)) self.contents.fill_rect(x + 2, y + 2, 1 * 120, 10, Color.new(0, 0, 0, 150)) self.contents.fill_rect(x + 2, y + 2, hpwidth, 10, Color.new(155, 50, 50, 100)) end #--------------------------------------------------------------------------# # * Metodo de dibujado de la barra de mp #--------------------------------------------------------------------------# def draw_mp_bar(actor, x, y) mpwidth = (actor.mp * 10) / actor.maxmp * 12 * (1) self.contents.fill_rect(x + 0, y + 0, 1 * 120 + 4, 14, Color.new(0, 0, 0, 100)) self.contents.fill_rect(x + 1, y + 1, 1 * 120 + 2, 12, Color.new(255, 255, 255)) self.contents.fill_rect(x + 2, y + 2, 1 * 120, 10, Color.new(0, 0, 0, 150)) self.contents.fill_rect(x + 2, y + 2, mpwidth, 10, Color.new(50, 50, 155, 100)) end #--------------------------------------------------------------------------# # * Metodo de dibujado de la barra de exp #--------------------------------------------------------------------------# def draw_exp_bar(actor, x, y) exp = actor.exp_s.to_i max_exp = actor.next_exp_s.to_i expwidth = (exp * 10) / max_exp * 12 * (1) self.contents.fill_rect(x + 0, y + 0, 1 * 120 + 4, 14, Color.new(0, 0, 0, 100)) self.contents.fill_rect(x + 1, y + 1, 1 * 120 + 2, 12, Color.new(255, 255, 255)) self.contents.fill_rect(x + 2, y + 2, 1 * 120, 10, Color.new(0, 0, 0, 150)) self.contents.fill_rect(x + 2, y + 2, expwidth, 10, Color.new(50, 155, 50, 100)) end #--------------------------------------------------------------------------# # * Draw EXP Editado #--------------------------------------------------------------------------# def draw_hud_actor_exp(actor, x, y) self.contents.font.color = Color.new(10, 100, 10) draw_exp_bar(actor, x, y + 16) self.contents.draw_text(x - 30, y + 6, 32, 32, 'E') self.contents.font.color = normal_color self.contents.draw_text(x, y, 84, 32, actor.exp_s, 2) self.contents.draw_text(x + 84, y, 12, 32, '/', 1) self.contents.draw_text(x + 96, y, 84, 32, actor.next_exp_s) end #--------------------------------------------------------------------------# # * Draw HP Editado #--------------------------------------------------------------------------# def draw_hud_actor_hp(actor, x, y, width = 144) self.contents.font.color = Color.new(100, 10, 10) if width - 32 >= 108 hp_x = x + width - 108 flag = true elsif width - 32 >= 48 hp_x = x + width - 48 flag = false end draw_hp_bar(actor, hp_x - 36, y + 16) self.contents.draw_text(x - 30, y + 6, 32, 32, Vocab::hp_a) self.contents.font.color = actor.hp == 0 ? knockout_color : actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2) if flag self.contents.font.color = normal_color self.contents.draw_text(hp_x + 48, y, 12, 32, '/', 1) self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s) end end #--------------------------------------------------------------------------# # * Draw mp Editado #--------------------------------------------------------------------------# def draw_hud_actor_mp(actor, x, y, width = 144) self.contents.font.color = Color.new(10, 10, 100) if width - 32 >= 108 mp_x = x + width - 108 flag = true elsif width - 32 >= 48 mp_x = x + width - 48 flag = false end draw_mp_bar(actor, mp_x - 36, y + 16) self.contents.draw_text(x - 30, y + 6, 32, 32, Vocab::mp_a) self.contents.font.color = actor.mp == 0 ? knockout_color : actor.mp <= actor.maxmp / 4 ? crisis_color : normal_color self.contents.draw_text(mp_x, y, 48, 32, actor.mp.to_s, 2) if flag self.contents.font.color = normal_color self.contents.draw_text(mp_x + 48, y, 12, 32, '/', 1) self.contents.draw_text(mp_x + 60, y, 48, 32, actor.maxmp.to_s) end end #----------------------------------------------------------------------------# end L'auteur est cité dans le script, ca enleve les deux case du bas (celle ou il y avais les items et les skills)mais en contre partie ca place une barre d'exp dans la case du haut. Il est simple a utiliser pour le fermer il suffi de desactiver l'interupteur 20 et inversement ca permet de faire des scene sans objet qui gene sur l'ecrant^^. L'id de l'interrupteur et modifiable dans le script. Voila. | |
|