Disposing Windows in Battle Scene

Discussion in 'RGSSx Script Support' started by Rikifive, Aug 31, 2015.

  1. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    676
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    Welcome Message
    Hello everybody!
    I'm having a little problem here.
     
    Problem Description
    I'm trying to make a window in Scene_Battle, where some information would be shown (variable and stuff - it doesn't matter here).
    The thing is, I know how to make a window and it appears in battle scene, but it gets disposed when character's turn comes doesn't appear back.
    I'm suspecting MOG's ATB is causing this, but I'm not sure.
     
    Visual Demonstration
    Basically, that's how that looks.

    [​IMG]
    And what happens when turn comes:
    [​IMG]
     
    Summary
    As you can see, the window simply disappears and I have no idea how to prevent that. Am I doing something wrong, or it's because of MOG's ATB?
     
    Additional Information
    What is in the window is not important - I just want to make a transparent window with some information in it.
     
    References
    1) This is the very basic script for my window.
    #-< ҉ >---< Initialize >----------------------------------------------------class Window_WutWindow < Window_Basedef initialize(x, y)super(x, y, 200, 48)self.opacity = 50refreshend#-< ҉ >---< Draw Content >----------------------------------------------------def refreshself.contents.clearself.contents.draw_text(0, 0, 150, 24, "BOX OF FUN", 0)end # Refreshend # class#-< ҉ >---< Create window in Battle Scene >------------------------------------class Scene_Battle < Scene_Base#-< ҉ >---< Start >---------------------------------------------------------alias wutwindow_start startdef startwutwindow_startcreate_wutwindow_windowend#-< ҉ >---< Create WUT Window >----------------------------------def create_wutwindow_window@wutwindow_window = Window_WutWindow.new(50, 50)endend#=[ ҉ ]===[ END ]===============================================================
    If there's something missing, that causes this - I'd appreciate your help.
    2) Just in case here's the MOG's ATB Script + Battle HUD.
    There is the whole HUD drawn, so if it's possible to add that information (window) here, then I'd also appreciate your help.
     
    Farewell Message
    Does anybody know what causes this and how to prevent that window from disposing?
    Thank you in advance.

    Origin of Thread
    Firstly I asked that question on the other thread ~ And so far I got and tried this, but the same thing happens.
     
    Last edited by a moderator: Aug 31, 2015
    #1
  2. KockaAdmiralac

    KockaAdmiralac Cube-shaped garbage can Veteran

    Messages:
    570
    Likes Received:
    156
    Location:
    Belgrade
    First Language:
    Serbian
    Primarily Uses:
    N/A
    I think the problem is in the MOG Battle System or Battle HUD.

    I tested it with YEA Battle Engine and Yami Engine Symphony, and the window appeared...

    I'll try to find out what's the problem and I'll edit this post then.

    EDIT : Or not. I'll just post it down there.
     
    Last edited by a moderator: Aug 31, 2015
    #2
  3. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    676
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    The window appears, but it's disposed right after one of characters' ATB gauge fills up and command window pops out.

    I think adding 'that window' in MOG's script among with the battle HUD etc. could solve the problem, but I'm not sure.
     
    #3
  4. KockaAdmiralac

    KockaAdmiralac Cube-shaped garbage can Veteran

    Messages:
    570
    Likes Received:
    156
    Location:
    Belgrade
    First Language:
    Serbian
    Primarily Uses:
    N/A
    I know what you mean.

    This code works for me :

    Code:
    class Scene_Battle < Scene_Base  alias :rikifive_random_alias_create_all_windows_4C3n :create_all_windows  def create_all_windows    rikifive_random_alias_create_all_windows_4C3n    create_hud_window  end  def create_hud_window    viewport = Viewport.new    viewport.ox = Graphics.width - 100    viewport.z = 1000    @hud_window = Window_RikifiveHUD.new    @hud_window.viewport = viewport    # And maybe add some set_handler's here if your window is selectable ...  endendclass Window_RikifiveHUD < Window_Base  def initialize    super(0, 0, 100, 100)    self.z = 150    # And other things...  end  def update    super    self.visible = true unless self.visible  endend
     
    Last edited by a moderator: Aug 31, 2015
    #4
    Rikifive likes this.
  5. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    676
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    Yes it works (though some flickering can be sometimes noticed) ~ but still works. =)

    So basically, that was the answer:

    self.visible = true unless self.visible

    =)

    Have you found why is that happening?
     
    #5
  6. KockaAdmiralac

    KockaAdmiralac Cube-shaped garbage can Veteran

    Messages:
    570
    Likes Received:
    156
    Location:
    Belgrade
    First Language:
    Serbian
    Primarily Uses:
    N/A
    Nope.

    But I found out the window is snapping to invisibility whenever command window opens.

    I'm not quite a fan of MOG scripts, so I didn't want to look WHY is that actually happening.

    This may be less performance-friendly, but working for now...
     
    #6
  7. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    676
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    I see. Perhaps I'll try to find that later.

    Thanks for help.
     
    #7

Share This Page