Hide/Unhide Battle UI?

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.
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.
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.

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.
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
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
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.
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.

The cut-in animation is done with a series of Show/Move Picture commands.

Spoiler
upload_2018-7-10_12-49-31.png
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
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

Thank you, TheoAllen! This has worked out!

Original thread: https://forums.rpgmakerweb.com/threads/hide-unhide-battle-ui.97481/