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.

Need help with advanced window

So I read Law's tutorial on making Advanced Windows, and mine is the type where it's a status menu that stays there (event calls window, and it's parallel process) and it's basically a variable value (my Party AP system for a skill tree) that shows like "n Party AP". However, when the variable value is updated in game, the numbers overlap...how would I fix it so it updates the number and replaces it?
Screenie for ref

My Advanced Window script:
Code:
#==============================================================================

# ** Window_Advanced

#------------------------------------------------------------------------------

# This class uses the draw methods.  

#==============================================================================

 

class Window_Advanced < Window_Base

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(5, 5, 165, 115)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    self.contents.draw_text(0,0,150,100,$game_variables[1].to_s,1)

    self.contents.font.color = knockout_color

    self.contents.draw_text(25, 25, 150, 100, "Party AP")

  end

end
 
Edit... This should be ok and the String should only be drawn once per frame. We'd need to take a look at the Scene script you're making or editing.

[rgss]def refresh # or update depending on which one are you using
  self.contents.clear
  # rest of your code
end
[/rgss]
 

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