PhoenixTilea
Member
Okay, I was attempting to display a custom window in my game through an event using the $scene = <Window name> script command. This worked fine with simple windows, but for some reason it wasn't working with the window I had. (Does outputting variables make a difference?) Anyway, I was given this HUD script. It's not returning any errors, but my game is completely frozen the moment I start it, and my last help topic pretty much got ignored. I'm trying to get this finished for someone and I hate that I'm taking so freakin' long.
That's the code I was given that's freezing my game. Does anyone know what's wrong with it?
Code:
class Scene_Map
attr_accessor :hud
alias smap_main main
alias smap_update update
def main
@hud = Window_Energy.new
smap_main
@hud.dispose
end
def update
@hud.update
if $game_player.y < 3
@hud.opacity = 160
else
@hud.opacity = 235
end
smap_update
end
end
That's the code I was given that's freezing my game. Does anyone know what's wrong with it?