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.

Whats wrong with this script?

Its an edit of the hud from MNetplay for Netplay+. I cannot get the bars to show up on the map though what am i doing wrong?

Code:
#==========================================
# [!] Window_Map
#==========================================
class Window_Map < Window_Base
  
  # Initialize
  def initialize
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 160
    refresh
  end
  
  # Refresh
  def refresh
    
    # Clear the window
    self.contents.clear
    
    # Font change and players online
    self.contents.font.color = system_color
    self.contents.draw_text(40, 57, 640, 32, @npsize.to_s) if $game_settings.play_hud
    self.contents.font.color = normal_color
    self.contents.font.size = 20
    self.contents.draw_text(30, -60, 640, 140, $game_actors[1].name.to_s)
    
    
    # HP and SP Bars
    draw_normal_barz(10, 5, "vertical", 125, 7, $game_actors[1].hp.to_i, $game_actors[1].maxhp.to_i)
    draw_normal_barz(10, 140, "vertical", 125, 7, $game_actors[1].sp.to_i, $game_actors[1].maxsp.to_i, Color.new(221,0,0,255))
    
  
  # Update
  def update
    players = 0
    for i in 0...$network.players.size
      players += 1
    end
    @npsize = (players += 1)
    refresh
  end
end
end
 

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