l0rdph0enix
Member
Ok Basicly what I'm asking here is I have this Hud
Now the purpose of this Hud is it's a small part of a bigger User Interface system that. This piece is the housing for a Common Event that runs paralleled that's job is to monitor the main players States (i.e. Normal, Sleepy, Confused, ect.).
What I'd like to do is to cut out the middle man all together, removed the Common Event and the Hud Script Monitor the states and change the png it shows accordingly.
Thanks for the help in advance.
Code:
#==============================================================================
# States_Hud
#------------------------------------------------------------------------------
# By: L0rdPh0enix
# Helped by: Khmp, Gando
# 5/4/2008
#------------------------------------------------------------------------------
#==============================================================================
HUD_SWITCH = 2
class States_Hud < Window_Base
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
def initialize
super(441, 0, 85, 61)
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 stateshud_main main
alias stateshud_update update
def main
@stateshud = States_Hud.new
stateshud_main
@stateshud.dispose
end
def update
if $game_switches[HUD_SWITCH]
@stateshud.visible = true
else
@stateshud.visible = false
end
@stateshud.update
stateshud_update
end
end
Now the purpose of this Hud is it's a small part of a bigger User Interface system that. This piece is the housing for a Common Event that runs paralleled that's job is to monitor the main players States (i.e. Normal, Sleepy, Confused, ect.).
http://i27.tinypic.com/2a8kjkz.png[/img]Normal
http://i26.tinypic.com/m4qwl.png[/img]Barrier
http://i25.tinypic.com/qy8y7m.png[/img]Blind
http://i29.tinypic.com/5vuo1s.png[/img]Confused
http://i30.tinypic.com/5nw6fr.png[/img]Knocked Out
http://i32.tinypic.com/ztdro5.png[/img]Mute
http://i26.tinypic.com/n2jvdj.png[/img]Paralyzed
http://i32.tinypic.com/2n88pxk.png[/img]Poisoned
http://i27.tinypic.com/2ijrrrq.png[/img]Sleep
http://i25.tinypic.com/35m4c4n.png[/img]Stunned
http://i26.tinypic.com/m4qwl.png[/img]Barrier
http://i25.tinypic.com/qy8y7m.png[/img]Blind
http://i29.tinypic.com/5vuo1s.png[/img]Confused
http://i30.tinypic.com/5nw6fr.png[/img]Knocked Out
http://i32.tinypic.com/ztdro5.png[/img]Mute
http://i26.tinypic.com/n2jvdj.png[/img]Paralyzed
http://i32.tinypic.com/2n88pxk.png[/img]Poisoned
http://i27.tinypic.com/2ijrrrq.png[/img]Sleep
http://i25.tinypic.com/35m4c4n.png[/img]Stunned
Thanks for the help in advance.