MrCorniszon - Nie 22 Kwi, 2012 16:32 Temat postu: Sam pasek hpNa szybko... chodzi mi o HUD ale tylko z paskiem hp np coś takiego:
http://www.ultimateam.pl/viewtopic.php?t=6254
- tylko chcę sam pasek hp. Z góry dzięki tracersgta - Nie 22 Kwi, 2012 17:39
Spoiler:
Kod:
# Jest to przerobiony skrypt HUD autorstwa SojaBird
# Dodana grafika pasków oraz poprawiony pasek z doświadczeniem.
# by Ayene
# usunięcie dziadostwa by tracersgta
def update
self.visible = $game_system.hud_display
return if !self.visible
refresh if @hp != @actor.hp or @mp != @actor.mp or @exp != @actor.exp
hide_status
end
end
class Scene_Map < Scene_Base
alias got_hud_start start
alias got_hud_terminate terminate
alias got_hud_update update
def start
got_hud_start
@index = HUD_HP_MP_EXP::ACTOR_ID
new_hud
end
def terminate
@got_hud.dispose
got_hud_terminate
end
def update
got_hud_update
@got_hud.update
return if !HUD_HP_MP_EXP::CYCLE
return if !@got_hud.visible
if Input.trigger?(Input::R)
@index += 1
@index %= $game_party.members.size
elsif Input.trigger?(Input::L)
@index += $game_party.members.size - 1
@index %= $game_party.members.size
end
new_hud if @index != @got_hud.index
end
def new_hud
@got_hud.dispose if !@got_hud.nil?
@got_hud = Window_HUD_HP_MP_EXP.new(@index)
end
end
class Game_System
alias hud_initialize initialize
attr_accessor :hud_display
def initialize
hud_initialize
@hud_display = HUD_HP_MP_EXP::HUD_START_DISPLAY
end
end
class Game_Actor < Game_Battler
def gained_exp(current_level, current_exp)
return (current_exp - @exp_list[current_level])
end
def needed_exp(current_level)
return (@exp_list[current_level + 1] - @exp_list[current_level])
end
end