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.

Pictorial HP/SP on Map HUD Please!

I didn't think I should detract from Mea's topic [pictorial HP/SP indicators. Do able?] so I've made my own. I'd like an on-map HUD that shows a row of hearts for HP and another row of something different I haven't decided on for SP. I'd also appreciate a blue bar for Exp if you don't mind. I'd like them to 'peel' back just like Mea's vials but horizontally across the row (right to left).

Thanks!:#
 
try this? It doesn't really do anything yet but It will work if you call it.

Code:
class Bitmap
  def draw_2pic_gradient_bar2(x, y, current, max, background_file, bar_file)
    bitmap = RPG::Cache.hud(background_file)
    self.blt(x, y, bitmap, Rect.new(0, 0, bitmap.width, bitmap.height))
    bitmap = RPG::Cache.hud(bar_file)
    w = Integer(bitmap.width * (current / max.to_f))
    self.blt(x, y, bitmap, Rect.new(0, 0, w, bitmap.height))
  end
end

x = position on x-axis
y = position on y-axis
current = Current amount of bar
max = maximum amount bar can be
background_file = Background fle name in pictures folder
bar_file = file of bar picture

and you could probably change the files using conditional branches. It would be kinda laggy but that's the only way I know how to do it.
 

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