You should consider joining our Discord to ask for support.

We created a support channel using the new Discord Forum feature!

You can also visit our new website, it has a help section in English and French

0 like 0 dislike
439 views
in Script help by (530 points)

Hello, currently this is what the battle ui looks like. To access the HP Bar, I'll have to click on the "Y" button to access it. I'm trying to remove the "Y" and the "X" button and instead replace it with the actual HP bar, but I can't figure it out how. 

Replace the (S or A button) with the HP Bar

1 Answer

0 like 0 dislike
by (28.0k points)

Try with that script:

module Battle
  class Visual
    # Set the state info
    # @param state [Symbol] kind of state (:choice, :move, :move_animation)
    # @param pokemon [Array<PFM::PokemonBattler>] optional list of Pokemon to show (move)
    def set_info_state(state, pokemon = nil)
      if state == :choice
        show_info_bars(bank: 1)
        show_info_bars(bank: 0)
        hide_team_info
      elsif state == :move
        hide_info_bars
        pokemon&.each { |target| show_info_bar(target) }
      elsif state == :move_animation
        hide_info_bars
        hide_team_info
      end
    end
  end
end
by (530 points)
Hi, it works, but the X and Y buttons are still there (which I can remove the pictures for), but say if I click on the "Y" button to view the HP bar and then go back, the HP Bar goes missing again.
by (14.8k points)
You'll have to code for that.
...