+- +-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Stats

Members
Total Members: 3
Latest: zerocold
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 92
Total Topics: 89
Most Online Today: 1
Most Online Ever: 53
(November 05, 2019, 12:20:32 am)
Users Online
Members: 0
Guests: 1
Total: 1

Author Topic: [XP] HUD - Sword Art Online  (Read 19 times)

0 Members and 0 Guests are viewing this topic.

GameDev

  • Administrator
  • Jr. Member
  • *****
  • Posts: 86
  • Karma: +0/-0
    • View Profile
    • Blog
[XP] HUD - Sword Art Online
« on: April 15, 2019, 11:51:09 pm »

Clique aqui para ver a imagem[/center]

Criado por: lasso (para RMVXA )
Convertido para RMXP por: Crixus
Versão RMVX por: Faalco - Link
Compatibilidade: RMXP (Não sei quanto ao VX)

Demonstração:
Download - 4shared (use seu Gmail ou Facebook pra baixar)


Como usar:
Coloque acima de Main e o coloque as imagens HUD.png e HPBAR.png na pasta \Graphics\Pictures


HUD.png



HPBAR.png



Script:
Code: [Select]
#==============================================================================
# Hud - Sword Art Online - RMXP
#------------------------------------------------------------------------------
# Criador:  lasso (RMVXA)
# Convertido por Crixus para RMXP
#==============================================================================

class Spriteset_Map
  alias initialize_HUD initialize
  def initialize
    create_hud
    initialize_HUD
  end
  def create_hud
    @HUD = Sprite.new(nil)
    @HUD.z = 150
    @HUD.bitmap =Bitmap.new("Graphics/Pictures/HUD.png")
    @HPBAR = Sprite.new(nil)
    @HPBAR.z = 149
    @HPBAR.bitmap = Bitmap.new("Graphics/Pictures/HPBAR.png")

    @old_name = ""
    @old_hp = 0
    @old_max_hp = 0
    @old_level = 0
  end
  alias dispose_HUD dispose
  def dispose
    dispose_hud
    dispose_HUD
  end
  def dispose_hud
    @HUD.dispose
    @HPBAR.dispose
  end
  alias update_HUD update
  def update
    refresh_hud if @old_name != $game_party.actors[0].name or @old_hp != $game_party.actors[0].hp or @old_max_hp != $game_party.actors[0].maxhp or @old_level != $game_party.actors[0].level
    update_HUD
  end
  def refresh_hud
    @HUD.bitmap.clear
    @HUD.bitmap = Bitmap.new("Graphics/Pictures/HUD.png")
    @HUD.bitmap.draw_text(45, 22, 80, 30, $game_party.actors[0].name)
    @HUD.bitmap.font.size = 16
    @HUD.bitmap.draw_text(241, 45, 70, 20, $game_party.actors[0].hp.to_s + "/" +$game_party.actors[0].maxhp.to_s, 1)
    @HUD.bitmap.draw_text(311, 45, 30, 20, "Lv " + $game_party.actors[0].level.to_s, 1)
    @HPBAR.bitmap = Bitmap.new("Graphics/Pictures/HPBAR.png")
     for x in 126..335
      for y in 27..43
        if y>-3*x/2+313*$game_party.actors[0].hp/$game_party.actors[0].maxhp+218
          @HPBAR.bitmap.set_pixel(x,y,Color.new(0,0,0,0))
        end
      end
    end
    @old_level = $game_party.actors[0].level
    @old_hp = $game_party.actors[0].hp
    @old_max_hp = $game_party.actors[0].maxhp
    @old_name = $game_party.actors[0].name
  end
end

 

+- Recent Topics

[MV] Fix error Failed to load data/Actors.json by GameDev
November 02, 2019, 06:16:24 pm

[2k] Laxius Power II - Destinies by Bibliothécaire
October 14, 2019, 03:04:23 pm

[2k] Laxius Power I - Random Story by Bibliothécaire
October 10, 2019, 12:10:05 pm

[2k] [2k3] Super Mario World - Rpg Maker by GameDev
October 09, 2019, 08:04:02 pm

[2k] [2k3] Encrypting your game with VIRTUAL BOX ENIGMA by GameDev
October 07, 2019, 08:51:25 pm

[Destiny] Analog clock - clock with hands by GameDev
October 04, 2019, 12:50:06 am

[XP] Avoiding Mistakes with Tilesets Locks by GameDev
October 03, 2019, 10:43:45 pm

[2k3] Rm2k SBS with Faces - Made with Rm2k3 Steam by GameDev
May 16, 2019, 03:18:55 pm

[Ineluki] Map CMS + Real Snapshot by GameDev
May 13, 2019, 11:00:37 pm

[2k3] Other Land - O Livro do Segredo by GameDev
May 10, 2019, 08:21:46 pm