Hide/Unhide Battle UI?

Discussion in 'RPG Maker VX Ace' started by McTricky, Jul 10, 2018.

  1. McTricky

    McTricky Veteran Veteran

    Messages:
    786
    Likes Received:
    371
    Location:
    London, United Kingdom
    First Language:
    English
    Hello everyone!

    So you know how in battle, whenever you had a text-box up the battle UI disappears? I was wondering if there's a way to call the engine to do that manually. I have a cut-in image that takes up the whole screen like so:

    upload_2018-7-9_16-6-31.png

    The only way I've been able to achieve the desired effect above is if I precede the cut-in animation with a text box, then after the image movement is done, the UI returns. Without preceding it with the text box. the cut-in animation simply plays underneath the battle UI.

    I was wondering if there's a way to hide the UI manually and unhide so that I don't have to resort to using a text box as a workaround.

    I am untilising the Battle Luna script from Luna Engine, if that helps.
     
    #1
  2. Lord Vectra

    Lord Vectra Master Eventer Veteran

    Messages:
    186
    Likes Received:
    323
    Location:
    The Abyss
    First Language:
    English
    Primarily Uses:
    RMVXA
    You might be able to find a cut-in animation script to that for you unless you already tried, they wasn't what you wanted, and Im misunderstanding you.
     
    #2
  3. McTricky

    McTricky Veteran Veteran

    Messages:
    786
    Likes Received:
    371
    Location:
    London, United Kingdom
    First Language:
    English
    The cut-in animation is unique to my game and uses various different images and various different "Show/Move Picture" commands.

    And yeah, you're misunderstanding me. My problem isn't with the cut-in animation, it's with clearing the HUD/UI from the battle screen.

    The below picture is what I DON'T WANT:
    upload_2018-7-10_1-45-13.png

    I want to be able to hide all of the battle stuff from the screen before playing the image cut-in, and then unhide the battle stuff after it's over.
     
    #3
  4. A-Moonless-Night

    A-Moonless-Night WINTER IS COMING Veteran

    Messages:
    477
    Likes Received:
    342
    Location:
    New Zealand
    First Language:
    English
    Primarily Uses:
    RMVXA
    I haven't tested it, but can you do something like this?
    Code:
    SceneManager.scene.status_window.close
    SceneManager.scene.party_command_window.close
    SceneManager.scene.actor_command_window.close
    
    #---
    
    SceneManager.scene.status_window.open
    SceneManager.scene.party_command_window.open
    SceneManager.scene.actor_command_window.open
     
    #4
  5. McTricky

    McTricky Veteran Veteran

    Messages:
    786
    Likes Received:
    371
    Location:
    London, United Kingdom
    First Language:
    English
    Didn't seem to.

    upload_2018-7-10_11-31-17.png

    This is how I ran it:

    upload_2018-7-10_11-31-42.png
     
    #5
  6. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,212
    Likes Received:
    4,666
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Just curious. How you did the cut-in? Are you using show picture? I might able to put show picture in front of anything, but not hiding the battle UI, unless I'm somehow willing to dig deeper into Luna Engine and search how to hide them all.
     
    #6
  7. McTricky

    McTricky Veteran Veteran

    Messages:
    786
    Likes Received:
    371
    Location:
    London, United Kingdom
    First Language:
    English
    The cut-in animation is done with a series of Show/Move Picture commands.

    upload_2018-7-10_12-49-31.png
     
    #7
  8. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,212
    Likes Received:
    4,666
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    See if this works. It uses switch, turn it on, and new pictures will be displayed in front of UI. Or at least it should. So yeah, you need to turn on the switch before using any show pictures
    Code:
    class Spriteset_Battle
    # Switch ID. When switch is on. New pictures will be displayed in front of UI
      ViewportSwitch = 10
     
      alias create_more_viewports create_viewports
      def create_viewports
        create_more_viewports
        @viewport4 = Viewport.new
        @viewport4.z = 999
      end
     
      alias dispose_more_viewports dispose_viewports
      def dispose_viewports
        dispose_more_viewports
        @viewport4.dispose
      end
     
      def update_pictures
        $game_troop.screen.pictures.each do |pic|
          @picture_sprites[pic.number] ||= Sprite_Picture.new(pic_vport, pic)
          @picture_sprites[pic.number].update
        end
      end
     
      def pic_vport
        $game_switches[ViewportSwitch] ? @viewport4 : @viewport2
      end
     
    end
    
     
    Last edited: Jul 10, 2018
    #8
  9. McTricky

    McTricky Veteran Veteran

    Messages:
    786
    Likes Received:
    371
    Location:
    London, United Kingdom
    First Language:
    English
    Thank you, TheoAllen! This has worked out!
     
    #9

Share This Page