Notorius Simple HUD




Fitur

  • Menampilkan Nama actor
  • Menampilkan HP dan SP actor
  • Menampilkan State Actor



Screenshots





Demo

Ga butuh...


Scripts
Code:

#==============================================================================
# ** Window_Hud
#------------------------------------------------------------------------------
# Menampilkan blablabla... ga berguna
#
#Note: hanya menampilkan actor nomer 1
#==============================================================================

class Window_Hud < Window_Base
  #--------------------------------------------------------------------------
  # Initialize
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 300, 100)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # Refresh
  #--------------------------------------------------------------------------
  def refresh
      self.contents.clear
      for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      draw_actor_name(actor, 0, 0) #menampilkan nama
      draw_actor_state(actor, 70, 0) #State
      draw_actor_hp(actor, 0, y + 30) #HP
      draw_actor_sp(actor, 140, y + 30) #SP
    end
  end
  #--------------------------------------------------------------------------
  # Update
  #--------------------------------------------------------------------------
  def update
    refresh #Ya ile, puter-puter
  end
end




Instruksi
  • Tambahkan beberapa hal ke Scene_Map: ganti:
    Spoiler:
    Code:
      def main
        # Make sprite set
        @spriteset = Spriteset_Map.new
        # Make message window
        @message_window = Window_Message.new
        # Transition run
        Graphics.transition
        # Main loop
        loop do

    menjadi ini:
    Spoiler:
    Code:
      def main
        # Make sprite set
        @spriteset = Spriteset_Map.new
        # Make message window
        @message_window = Window_Message.new
        # Buat WindowHud
        @hud = Window_Hud.new
        @hud.x = 0 # Lokasi X Hud
        @hud.y = 0 # Lokasi Y hud
        @hud.opacity = 0 #Opacity HUD
        @hud.back_opacity = 0 #Back_O HUD
        # Transition run
        Graphics.transition
        # Main loop
        loop do

  • dan juga
    Spoiler:
    Code:

        # Dispose of sprite set
        @spriteset.dispose
        # Dispose of message window
        @message_window.dispose

    menjadi
    Spoiler:
    Code:

        # Dispose of sprite set
        @spriteset.dispose
        # Dispose of message window
        @message_window.dispose
        # Hapus HUD
        @hud.dispose

  • terakhir,
    Spoiler:
    Code:

      def update
        # Loop
        loop do
          # Update map, interpreter, and player order
          # (this update order is important for when conditions are fulfilled
          # to run any event, and the player isn't provided the opportunity to
          # move in an instant)
          $game_map.update
          $game_system.map_interpreter.update
          $game_player.update
          # Update system (timer), screen
          $game_system.update
          $game_screen.update
          # Abort loop if player isn't place moving

    menjadi
    Spoiler:
    Code:

      def update
        # Loop
        loop do
          # Update map, interpreter, and player order
          # (this update order is important for when conditions are fulfilled
          # to run any event, and the player isn't provided the opportunity to
          # move in an instant)
          $game_map.update
          $game_system.map_interpreter.update
          $game_player.update
          #update Window_HUD
          @hud.update #atau @hud.refresh
          # Update system (timer), screen
          $game_system.update
          $game_screen.update
          # Abort loop if player isn't place moving




Penulis : Irgi Kusuma ~ Sebuah blog yang menyediakan berbagai macam informasi

Artikel Notorius Simple HUD ini dipublish oleh Irgi Kusuma pada hari Minggu, 26 Februari 2012. Semoga artikel ini dapat bermanfaat.Terimakasih atas kunjungan Anda silahkan tinggalkan komentar.sudah ada 0 komentar: di postingan Notorius Simple HUD
 

0 komentar:

Posting Komentar