King Moogle
Sponsor
Hello, all!
Let me preface this by saying that I have virtually no working knowledge of RGSS. I've done some some stuff, but it's been awhile, and I've pretty much forgotten everything.
Right, on to my question.
I have a window that occurs only when Switch 001 is "On". It works fine, but the problem is that it only checks to see if this switch is on upon entering or exiting the menu. At the least I need it to check upon entering or leaving a map, but I would prefer it to be constantly (a few frame interval is fine) checking to see whether or not Switch 001 is "On". Here is the code:
Please forgive how sloppy it is. Like I said, the work of a beginner.
Thanks!
EDIT--
I remembered that I also had this in Scene_Map:
Let me preface this by saying that I have virtually no working knowledge of RGSS. I've done some some stuff, but it's been awhile, and I've pretty much forgotten everything.
Right, on to my question.
I have a window that occurs only when Switch 001 is "On". It works fine, but the problem is that it only checks to see if this switch is on upon entering or exiting the menu. At the least I need it to check upon entering or leaving a map, but I would prefer it to be constantly (a few frame interval is fine) checking to see whether or not Switch 001 is "On". Here is the code:
Code:
class Window_YourHUD < Window_Base
attr_reader :hide#
def initialize(act=0)
@act = act
@hide = -160 + @act*240#
super(0, 0, 170, 130)
self.back_opacity = 85
if $game_switches[1] == false#
self.x = -160#
end#
if $game_switches[1] == false#
self.x = @hide#
self.y = -128#
end#
self.contents = Bitmap.new(width - 32, height - 32)
end
end
Please forgive how sloppy it is. Like I said, the work of a beginner.
Thanks!
EDIT--
I remembered that I also had this in Scene_Map:
Code:
class Scene_Map
alias yourhud_main main
alias yourhud_update update
def main
@yourhud = Window_YourHUD.new
yourhud_main
@yourhud.dispose
end
def update
@yourhud.update
yourhud_update
end
end