l0rdph0enix
Member
Ok so I have this Hud script that right now I'm using just to "draw" a box.
The problem is when I use this
It works just fine, but not where I want it.
If I use this
then SDK 2.4 crashes with an error from this part of the script.
"sdk_bitmap_init(*args)"
Any idea why it's doing this?
Code:
#==============================================================================
# Sidebar_Hud
#------------------------------------------------------------------------------
# By: L0rdPh0enix
# Helped by: Khmp, Gando
# 5/4/2008
#------------------------------------------------------------------------------
#==============================================================================
HUD_SWITCH = 2
class Sidebar_Hud < Window_Base
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
def initialize
super(0, 0, 383, 32) #super(587, 93, 52, 276)
self.z = 8000
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 200
self.visible = false
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
super
end
end
#==============================================================================
# ** Scene_Map
#==============================================================================
class Scene_Map
alias sidebarhud_main main
alias sidebarhud_update update
def main
@sidebarhud = Sidebar_Hud.new
sidebarhud_main
@sidebarhud.dispose
end
def update
if $game_switches[HUD_SWITCH]
@sidebarhud.visible = true
else
@sidebarhud.visible = false
end
@sidebarhud.update
sidebarhud_update
end
end
The problem is when I use this
Code:
super(587, 93, 52, 276)
If I use this
Code:
super(0, 0, 383, 32)
Code:
def initialize(*args)
# Original Initialization
sdk_bitmap_init(*args)
# Turn Disable Dispose ON
@disable_dispose = true
end
end
"sdk_bitmap_init(*args)"
Any idea why it's doing this?