Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Help Window

Status
Not open for further replies.
Hey, I need a little edit on one of the scripts that I have, so that when you select the enemy it makes the window a smaller width, I have done this but it makes the help message window at the top make it do it all the time which is what I don't want, hope this explains it, got some pics to explain it a bit better, also got the script of what ive done so far!...


This is what it is like when you select the enemy
View attachment 572

But unfortunalty it happens to the skills and item
View attachment 571

This is set as a new script above main at the moment
Code:
class Window_Help < Window_Base
  
  def initialize
    super(0, 0, 350, 66) # 350, 64
    self.contents = Bitmap.new(width - 32, height - 32) # 32, 32
  end
  
  def set_enemy(enemy)
    text = enemy.name
    state_text = make_battler_state_text(enemy, 112, false)
    if state_text != ""
      text += "  " + state_text
    end
    text += " " + enemy.hp.to_s + "/" + enemy.maxhp.to_s
    draw_slant_bar(x + 120 ,y + 27, enemy.hp, enemy.maxhp, 80, 6)
    set_text(text, 1)
  end
end

Thank You :D
 
Insert this below Window_Help somewhere.

Code:
class Window_Help < Window_Base
  alias seph_dehpbar_whlp_se set_enemy
  def set_enemy(enemy)
    seph_dehpbar_whlp_se(enemy)
    draw_slant_bar(contents.width / 2 - 40, 26, enemy.hp, enemy.maxhp, 80, 6)
  end
end
 
super(0, 0, 350, 66) # 350, 64​

Its because you changed the width of the window and the text doesn't fit anymore. Just change it back to (0, 0, 640, 64)

EDIT: I realize you wanted to do this.. Well you could try making two help windows, one with the reduced size and one without, and attatch them to the windows accordingly.
 
Hey, I tried your way SephirothSpawn, but it didnt do anything :S, where am I suppose to put it exactly?

Prexus, I tried doing that a while back (having two windows) but it didnt work properly :S

Thanks :D
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top