l0rdph0enix
Member
Hi just a moment of your time. I need help with a script i'm trying to piece together with no scripting knowledge.
I'm trying to get this hub from the ==Really=== Simple HUD Request topic to work with Near Fantastica Advanced Time System so it'll show the day of the week and the time, only hour and minute in am/pm format. But the hub script wants to update every from and not when the time changes every 60 frames. So it's lagging the game a bit. Can you help me fix that and make it so the hub doesn't slide in and out when i turn in on and off, it just appears and disappears. Thanks in advanced.
Code:
class Window_HUD < Window_Base
def initialize
super(640,480,176,112)
self.contents = Bitmap.new(140,80)
self.contents.font.size = 20
self.back_opacity = 160
refresh
end
def refresh
self.contents.clear
@actor = $game_party.actors[0]
self.contents.draw_text(4,0,132,20,$ats.date.to_s,1)
self.contents.draw_text(4,10,132,20,$ats.clock.to_s,1)
draw_actor_hp(@actor,4,16)
draw_actor_sp(@actor,4,36)
self.contents.draw_text(4,60,132,20,$game_party.gold.to_s,2)
self.contents.draw_text(4,60,132,20,$data_system.words.gold + ":")
end
end
class Scene_Map
alias hud_main main
alias hud_update update
def main
@hud = Window_HUD.new
hud_main
@hud.dispose
end
def update
@hud.refresh
if $game_switches[1] and @hud.x > 468
@hud.x -= 11
@hud.y -= 7
end
if $game_switches[1] == false and @hud.x < 640
@hud.x += 11
@hud.y += 7
end
hud_update
end
end
I'm trying to get this hub from the ==Really=== Simple HUD Request topic to work with Near Fantastica Advanced Time System so it'll show the day of the week and the time, only hour and minute in am/pm format. But the hub script wants to update every from and not when the time changes every 60 frames. So it's lagging the game a bit. Can you help me fix that and make it so the hub doesn't slide in and out when i turn in on and off, it just appears and disappears. Thanks in advanced.