Iawe galera fmz?!
bom sou iniciante em script comecei a querer mexer
faz pouco tempo e ja preciso de uma ajudinha no escript abaixo
eu quero coloca a barra de HP para cima como eu faço?
# -------- HP na Tela --------
hpbar = RPG::Cache.picture("barrinha_hp")
self.contents.font.size = 12
hpbarwidth = hpbar.lammer * @actor.hp / @actor.maxhp
hpbarheight = hpbar.height
hpbar_rect = Rect.new(0,0,hpbarwidth,hpbarheight)
self.contents.blt(24,27,hpbar,hpbar_rect)
if $game_party.actors[0].level <= 99
self.contents.draw_text(75, -3, 200, 70, "#{@actor.hp}/#{@actor.maxhp}")
else
self.contents.draw_text(40, 40, 100, 100, "#{@actor.hp}/#{@actor.maxhp}")
end
modifico aonde? alguem me explica onde e eu modifico aonde sobe a img aonde desce e talz?! pf
me ajudem e me expliquem como move os outros tambem desde ja agradeço fuiz
bom sou iniciante em script comecei a querer mexer
faz pouco tempo e ja preciso de uma ajudinha no escript abaixo
- Spoiler:
# -------------------------------------------------------------------------
# ---- Extraordinary Hud ------
# ------------------------------------------------------------------------------
# -------- Desenvolvida por: Felipe Cougo ( Vinks)
# -------- Caso for usar em seu jogo, coloque os devidos créditos.
# -------- Livre para editar a Hud, tanto em design quanto código.
# -------- Não poste em outros lugares sem pedir minha permissão,
# -------- mas se postar assim mesmo, coloque meus créditos.
# -------- Hud desenvolvida para lucasbiell.
# -------- Acesse Aldeia RPG BR : www.aldeiarpgbr.com/forum
# -------- Vinks para moderador global \o/
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
class Hud < Window_Base
def initialize
super(-10,-10,500,500)
self.back_opacity = 0
self.contents = Bitmap.new(lammer - 32, height - 32)
self.windowskin = RPG::Cache.windowskin("")
refresh
end
def update
super
refresh if something_changed?
end
def something_changed?
return true if @old_exp != @actor.now_exp
return true if @old_hp != @actor.hp
return true if @old_sp != @actor.sp
return true if @old_level != @actor.level
return true if @old_name != @actor.name
return false
end
def refresh
self.contents.clear
@actor = $game_party.actors[0]
@old_exp = @actor.now_exp
@old_hp = @actor.hp
@old_sp = @actor.sp
@old_level = @actor.level
@old_name = @actor.name
hud3 = RPG::Cache.picture("Base-2")
hud1 = hud3.lammer
hud2 = hud3.height
hud4 = Rect.new(0,0,hud1,hud2)
self.contents.blt(-13,-16,hud3,hud4)
# -------- Fundo --------
fundo = RPG::Cache.picture("Fundo")
fundowidth = fundo.lammer
fundoheight = fundo.height
fundo_rect = Rect.new(0,0,fundowidth,fundoheight)
self.contents.blt(1+1,1,fundo,fundo_rect)
# -------- Char do Personagem na Hud --------
if User_Edit::Face == true
grafico = $game_party.actors[0].character_name + "-char"
face = RPG::Cache.picture("#{grafico}")
face_rect = Rect.new(-240,-13,280,280)
self.contents.blt(14,13,face,face_rect)
end
# -------- Nome e Level --------
self.contents.font.color = Color.new(255,0,0)
self.contents.draw_text(65, -1, 249, 28, "#{@actor.name}")
self.contents.draw_text(367, 21, 249, 28, "#{@actor.level} ")
self.contents.font.color = Color.new(255,0,0)
# -------- Classe --------
self.contents.font.color = Color.new(255,0,0)
self.contents.draw_text(245, -237, 500, 500, "#{$data_classes[$game_party.actors[0].class_id].name}")
self.contents.font.color = Color.new(255,0,0)
# -------- Guild --------
self.contents.font.color = Color.new(255,0,0)
self.contents.draw_text(367, -21, 249, 68, "#{@actor.guild}")
self.contents.font.color = Color.new(255,0,0)
# -------- Gold --------
$game_party.item_number(Item_Ouro::Item_Id.to_i).to_s
self.contents.draw_text(367, -42, 249, 200, $game_player.x.to_s)
# -------- HP na Tela --------
hpbar = RPG::Cache.picture("barrinha_hp")
self.contents.font.size = 12
hpbarwidth = hpbar.lammer * @actor.hp / @actor.maxhp
hpbarheight = hpbar.height
hpbar_rect = Rect.new(0,0,hpbarwidth,hpbarheight)
self.contents.blt(24,27,hpbar,hpbar_rect)
if $game_party.actors[0].level <= 99
self.contents.draw_text(75, -3, 200, 70, "#{@actor.hp}/#{@actor.maxhp}")
else
self.contents.draw_text(40, 40, 100, 100, "#{@actor.hp}/#{@actor.maxhp}")
end
# -------- SP na Tela --------
mpbar = RPG::Cache.picture("barrinha_mp")
self.contents.font.size = 12
mpbarwidth = mpbar.lammer * @actor.sp / @actor.maxsp
mpbarheight = mpbar.height
mpbar_rect = Rect.new(0,0,mpbarwidth,mpbarheight)
self.contents.blt(24,53,mpbar,mpbar_rect)
if $game_party.actors[0].level <= 99
self.contents.draw_text(75, 23, 200, 70, "#{@actor.sp}/#{@actor.maxsp}")
else
self.contents.draw_text(40, 40, 100, 100, "#{@actor.sp}/#{@actor.maxsp}")
end
# -------- XP na Tela --------
if $game_party.actors[0].level != 99
xpbar = RPG::Cache.picture("barrinha_xp")
xpbarwidth = xpbar.lammer * @actor.now_exp / @actor.next_exp
xpbarheight = xpbar.height
xpbar_rect = Rect.new(0,0,xpbarwidth,xpbarheight)
self.contents.blt(24,81,xpbar,xpbar_rect)
end
end
end
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
end
end
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
eu quero coloca a barra de HP para cima como eu faço?
# -------- HP na Tela --------
hpbar = RPG::Cache.picture("barrinha_hp")
self.contents.font.size = 12
hpbarwidth = hpbar.lammer * @actor.hp / @actor.maxhp
hpbarheight = hpbar.height
hpbar_rect = Rect.new(0,0,hpbarwidth,hpbarheight)
self.contents.blt(24,27,hpbar,hpbar_rect)
if $game_party.actors[0].level <= 99
self.contents.draw_text(75, -3, 200, 70, "#{@actor.hp}/#{@actor.maxhp}")
else
self.contents.draw_text(40, 40, 100, 100, "#{@actor.hp}/#{@actor.maxhp}")
end
modifico aonde? alguem me explica onde e eu modifico aonde sobe a img aonde desce e talz?! pf
me ajudem e me expliquem como move os outros tambem desde ja agradeço fuiz