Lucas Roberto Administrador
Mensagens : 711
| Assunto: HP e MP em baixo do personagem Sáb 18 Jun 2011, 10:48 | |
| Converti este script ao VX, pois achei ele muito interessante. Mas todos os créditos vão ao Marlos Gama, criador da versão XP. Tópico original: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]Screenshot[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]Script - Código:
-
#============================================================================== # Actor Hp # By Marlos Gama # Version: 1.0 # Convertido ao VX por M3T #==============================================================================
class ActorHPBars < Window_Base def initialize super($game_player.screen_x-60,$game_player.screen_y-78,120,120) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 actor = 0 refresh end def refresh self.contents.clear actor = $game_party.members[0] self.contents_opacity = 255 self.x = $game_player.screen_x - 60 self.y = $game_player.screen_y - 78 fd = Cache.picture("actorbase") bw = fd.width bh = fd.height fd_rect = Rect.new(0,0,bw,bh) self.contents.blt(29,66,fd,fd_rect) barhp = Cache.picture("actorhp") bhw = barhp.width * actor.hp / actor.maxhp bhh = barhp.height barhp_rect = Rect.new(0,0,bhw,bhh) self.contents.blt(29,66,barhp,barhp_rect) fd2 = Cache.picture("actorbase") bw2 = fd.width bh2 = fd.height fd_rect2 = Rect.new(0,0,bw2,bh2) #MP self.contents.blt(29,69,fd,fd_rect) barmp = Cache.picture("actormp") bhw = barmp.width * actor.mp / actor.maxmp bhh = barmp.height barmp_rect = Rect.new(0,0,bhw,bhh) self.contents.blt(29,69,barmp,barmp_rect) fd2 = Cache.picture("actorbase") bw2 = fd.width bh2 = fd.height fd_rect2 = Rect.new(0,0,bw2,bh2) end end
class Scene_Map alias requiem_main main def main @actorhp = ActorHPBars.new requiem_main @actorhp.dispose if @d != true end alias requiem_update update def update requiem_update @actorhp.x = $game_player.screen_x-60 @actorhp.y = $game_player.screen_y-78 @actorhp.refresh @actorhp_update end end Instruções de usoCole o script na seção de scripts adicionais, e salve as imagens, na pasta Pictures do projeto em que vai usar o script: ActorBase [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]ActorHp [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]ActorMP [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]CréditosMarlos Gama - por criar o script M3T - por convertê-lo ao VX OBS: Eu iria postar a conversão no próprio tópico, mas estaria o revivendo. Por isso, criei um novo tópico(este que você está vendo). Até. | |
|