RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
HEARTS for health meter...?

0 Members and 3 Guests are viewing this topic.

***
Rep:
Level 83
X-PLAT!
EDIT:[scroll down for the latest edits on this working script!]

In the beginning ...

I was straightening out all the data in my laptop ... and I ran into this script...
I remember I had downloaded it off some french site that doesn't exist anymore.

on the site this script was separate with instructions to add in these three lines.

* I had marked these 3 sentences with "location?"

I'm unfamiliar with the script's flow, so I'm trying to guess each lines' position
in order to make it work: here's the script:
Spoiler for:
Code: [Select]
   #==========================================
    # Pommes de vie
    #
    # Script téléchargé sur www.rpg-creation.com
    #
    # Window_Corazones
    # Par DarkRog
    #-----------------------------------------
    #==========================================

    class Window_Corazones < Window_Base
    def initialize
    super(-8, -8, 640, 96)
        #=== Options ===
    corazones = 10
    opacidad = 255
    opcion = 2 #1-5?
    #=== Options fin ==
#    @corazones Window_Corazones.new############################location?
        self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    self.opacity = 0
    
    @hearts = corazones
    @opacity = opacidad
    @option = opcion
    @hr = 0
    refresh
  end
    #----------------------------------------
    # - Actualisation
    #----------------------------------------
    def refresh
    self.contents.clear
    @n = $game_party.actors[0].hp
    @mn = $game_party.actors[0].maxhp
    #n is the value, and mn the maxvalue:
    @hr = 0
    @lh = 0
    for i in 0..@hearts-1
    self.contents.fill_rect(i*14, 4, 1, 2, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+1, 3, 1, 4, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+2, 2, 1, 6, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+3, 1, 1, 8, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+4, 0, 1, 10, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+5, 1, 1, 10, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+6, 2, 1, 10, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+7, 1, 1, 10, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+8, 0, 1, 10, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+9, 1, 1, 8, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+10, 2, 1, 6, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+11, 3, 1, 4, Color.new(0, 0, 0, @opacity))
    self.contents.fill_rect(i*14+12, 4, 1, 2, Color.new(0, 0, 0, @opacity))
    #
    self.contents.fill_rect(i*14+1, 4, 1, 2, Color.new(255, 255, 255, @opacity))
    self.contents.fill_rect(i*14+2, 3, 1, 4, Color.new(255, 255, 255, @opacity))
    self.contents.fill_rect(i*14+3, 2, 1, 6, Color.new(255, 255, 255, @opacity))
    self.contents.fill_rect(i*14+4, 1, 1, 8, Color.new(255, 255, 255, @opacity))
    self.contents.fill_rect(i*14+5, 2, 1, 8, Color.new(255, 255, 255, @opacity))
    self.contents.fill_rect(i*14+6, 3, 1, 8, Color.new(255, 255, 255, @opacity))
    self.contents.fill_rect(i*14+7, 2, 1, 8, Color.new(255, 255, 255, @opacity))
    self.contents.fill_rect(i*14+8, 1, 1, 8, Color.new(255, 255, 255, @opacity))
    self.contents.fill_rect(i*14+9, 2, 1, 6, Color.new(255, 255, 255, @opacity))
    self.contents.fill_rect(i*14+10, 3, 1, 4, Color.new(255, 255, 255, @opacity))
    self.contents.fill_rect(i*14+11, 4, 1, 2, Color.new(255, 255, 255, @opacity))
    #
    #@c = 255
    @l = @n*100/@mn
    @ho = @l*@hearts
    #
    c_color(1)
    self.contents.fill_rect(i*14+2, 4, 1, 2, Color.new(@c, 0, 0, @opacity))
    c_color(2)
    self.contents.fill_rect(i*14+3, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
    c_color(3)
    self.contents.fill_rect(i*14+4, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
    c_color(4)
    self.contents.fill_rect(i*14+5, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
    c_color(5)
    self.contents.fill_rect(i*14+6, 4, 1, 6, Color.new(@c, 0, 0, @opacity))
    c_color(6)
    self.contents.fill_rect(i*14+7, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
    c_color(7)
    self.contents.fill_rect(i*14+8, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
    c_color(8)
    self.contents.fill_rect(i*14+9, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
    c_color(9)
    self.contents.fill_rect(i*14+10, 4, 1, 2, Color.new(@c, 0, 0, @opacity))
#    @corazones.refresh #####################################location?
    @hr += 1
    end
    if @option == 1
    self.contents.font.color.set(0, 0, 0)
    self.contents.draw_text(0 - 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
    self.contents.draw_text(0 - 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
    self.contents.draw_text(0 + 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
    self.contents.draw_text(0 + 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 7, 160, 32, $game_party.actors[0].name, 0)
    elsif @option == 2
    self.contents.font.color.set(0, 0, 0)
    self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
    self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
    self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
    self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 7, 160, 32, "#{@n}/#{@mn}", 0)
    elsif @option == 3
    self.contents.font.color.set(0, 0, 0)
    self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
    self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
    self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
    self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 7, 160, 32, "#{@ho/100}/#{@hearts}", 0)
    elsif @option == 4
    self.contents.font.color.set(0, 0, 0)
    self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@l}%", 0)
    self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@l}%", 0)
    self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@l}%", 0)
    self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@l}%", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 7, 160, 32, "#{@l}%", 0)
    end
  end
  
 #   @corazones.refresh #####################################location?

    def c_color(a)
    if @hr <= (@ho/100)-1
    @c = 255
    else
    if @ho/10-@hr*10 >= a and @ho/10-@hr*10 <= 9

    @c = 255
    else
    @c = 0
    end
    end
    end

    def corazones(corazones)
    @hearts = corazones
    end
    end

this would be tits! in any game!
I'd really like to get this thing working...anyone? please advise.
 ~((G//A\\//\/\\||E|F//A\\((C||E
« Last Edit: September 26, 2009, 06:49:08 AM by gameface101 »

***
Rep:
Level 83
X-PLAT!
I'm starting to understand how this script works....

so far here is my progress:
Spoiler for:
Code: [Select]
#==============================================================================
# Window_Corazones
# Par DarkRog
#------------------------------------------------------------------------------
#==============================================================================

class Window_Corazones < Window_Base

   def initialize
      super(-8, -8, 640, 96)
      #=== Options ===
      corazones = 10
      opacidad = 255
      opcion = 2
      #=== Options fin ==
      self.contents = Bitmap.new(width - 32, height - 32)
      self.contents.font.name = "Arial"#$fontface
      self.contents.font.size = 16#$fontsize
      self.opacity = 0
      @hearts = corazones
      @opacity = opacidad
      @option = opcion
      @hr = 0
      refresh
   end
  
   #-----------------------------------------------------------------------
   # - Actualisation
   #-----------------------------------------------------------------------
   def refresh
      self.contents.clear
      @n = $game_party.actors[0].hp
      @mn = $game_party.actors[0].maxhp
      #n is the value, and mn the maxvalue:
      @hr = 0
      @lh = 0
      
      for i in 0..@hearts-1
         self.contents.fill_rect(i*14, 4, 1, 2, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+1, 3, 1, 4, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+2, 2, 1, 6, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+3, 1, 1, 8, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+4, 0, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+5, 1, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+6, 2, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+7, 1, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+8, 0, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+9, 1, 1, 8, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+10, 2, 1, 6, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+11, 3, 1, 4, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+12, 4, 1, 2, Color.new(0, 0, 0, @opacity))
         #
         self.contents.fill_rect(i*14+1, 4, 1, 2, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+2, 3, 1, 4, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+3, 2, 1, 6, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+4, 1, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+5, 2, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+6, 3, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+7, 2, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+8, 1, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+9, 2, 1, 6, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+10, 3, 1, 4, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+11, 4, 1, 2, Color.new(255, 255, 255, @opacity))
         #
         @c = 255
         @l = @n*100/@mn
         @ho = @l*@hearts
#         c_color(1)
         self.contents.fill_rect(i*14+2, 4, 1, 2, Color.new(@c, 0, 0, @opacity))
#         c_color(2)
         self.contents.fill_rect(i*14+3, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
#         c_color(3)
         self.contents.fill_rect(i*14+4, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
#         c_color(4)
         self.contents.fill_rect(i*14+5, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
#         c_color(5)
         self.contents.fill_rect(i*14+6, 4, 1, 6, Color.new(@c, 0, 0, @opacity))
#         c_color(6)
         self.contents.fill_rect(i*14+7, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
#         c_color(7)
         self.contents.fill_rect(i*14+8, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
#         c_color(8)
         self.contents.fill_rect(i*14+9, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
#         c_color(9)
         self.contents.fill_rect(i*14+10, 4, 1, 2, Color.new(@c, 0, 0, @opacity))

         @hr += 1
      end
      
      if @option == 1
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, $game_party.actors[0].name, 0)
      elsif @option == 2
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@n}/#{@mn}", 0)
      elsif @option == 3
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@ho/100}/#{@hearts}", 0)
      elsif @option == 4
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@l}%", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@l}%", 0)
      end
   end
  
end

not certain but do I call this with: $scene = Scene_Windows_Corazones.new  

"?"

« Last Edit: September 07, 2009, 11:05:34 AM by gameface101 »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
No, seeing as this is just a window intended as a HUD, the scripter probably wants you to go into Scene_Map, create the window in the main method before the loop and dispose it in the main method below the loop, and probably also update the window in the update method.

***
Rep:
Level 83
X-PLAT!
@modern algebra - alright! thank you for your response! now we're getting somewhere~

Here's my edits to the Scene_Map script:
Spoiler for:
Code: [Select]
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================

class Scene_Map
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make sprite set
    @spriteset = Spriteset_Map.new
    # Make message window
    @message_window = Window_Message.new
    # make heart meter
    @corazones = Window_Corazones.new###############################[insert]
    # Transition run
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of sprite set
    @spriteset.dispose
    # Dispose of message window
    @message_window.dispose
    #dispose of heart meter
    @corazones.dispose##############################################[insert]
    # If switching to title screen
    if $scene.is_a?(Scene_Title)
      # Fade out screen
      Graphics.transition
      Graphics.freeze
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  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
      unless $game_temp.player_transferring
        break
      end
      # Run place move
      transfer_player
      # Abort loop if transition processing
      if $game_temp.transition_processing
        break
      end
    end
    # Update sprite set
    @spriteset.update
    # Update message window
    @message_window.update
    #update heart meter
    @corazones.update################################################[insert]
    # If game over
    if $game_temp.gameover
      # Switch to game over screen
      $scene = Scene_Gameover.new
      return
    end
    # If returning to title screen
    if $game_temp.to_title
      # Change to title screen
      $scene = Scene_Title.new
      return
    end
    # If transition processing
    if $game_temp.transition_processing
      # Clear transition processing flag
      $game_temp.transition_processing = false
      # Execute transition
      if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
      end
    end
    # If showing message window
    if $game_temp.message_window_showing
      return
    end
    # If encounter list isn't empty, and encounter count is 0
    if $game_player.encounter_count == 0 and $game_map.encounter_list != []
      # If event is running or encounter is not forbidden
      unless $game_system.map_interpreter.running? or
             $game_system.encounter_disabled
        # Confirm troop
        n = rand($game_map.encounter_list.size)
        troop_id = $game_map.encounter_list[n]
        # If troop is valid
        if $data_troops[troop_id] != nil
          # Set battle calling flag
          $game_temp.battle_calling = true
          $game_temp.battle_troop_id = troop_id
          $game_temp.battle_can_escape = true
          $game_temp.battle_can_lose = false
          $game_temp.battle_proc = nil
        end
      end
    end
    # If B button was pressed
    if Input.trigger?(Input::B)
      # If event is running, or menu is not forbidden
      unless $game_system.map_interpreter.running? or
             $game_system.menu_disabled
        # Set menu calling flag or beep flag
        $game_temp.menu_calling = true
        $game_temp.menu_beep = true
      end
    end
    # If debug mode is ON and F9 key was pressed
    if $DEBUG and Input.press?(Input::F9)
      # Set debug calling flag
      $game_temp.debug_calling = true
    end
    # If player is not moving
    unless $game_player.moving?
      # Run calling of each screen
      if $game_temp.battle_calling
        call_battle
      elsif $game_temp.shop_calling
        call_shop
      elsif $game_temp.name_calling
        call_name
      elsif $game_temp.menu_calling
        call_menu
      elsif $game_temp.save_calling
        call_save
      elsif $game_temp.debug_calling
        call_debug
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Battle Call
  #--------------------------------------------------------------------------
  def call_battle
    # Clear battle calling flag
    $game_temp.battle_calling = false
    # Clear menu calling flag
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    # Make encounter count
    $game_player.make_encounter_count
    # Memorize map BGM and stop BGM
    $game_temp.map_bgm = $game_system.playing_bgm
    $game_system.bgm_stop
    # Play battle start SE
    $game_system.se_play($data_system.battle_start_se)
    # Play battle BGM
    $game_system.bgm_play($game_system.battle_bgm)
    # Straighten player position
    $game_player.straighten
    # Switch to battle screen
    $scene = Scene_Battle.new
  end
  #--------------------------------------------------------------------------
  # * Shop Call
  #--------------------------------------------------------------------------
  def call_shop
    # Clear shop call flag
    $game_temp.shop_calling = false
    # Straighten player position
    $game_player.straighten
    # Switch to shop screen
    $scene = Scene_Shop.new
  end
  #--------------------------------------------------------------------------
  # * Name Input Call
  #--------------------------------------------------------------------------
  def call_name
    # Clear name input call flag
    $game_temp.name_calling = false
    # Straighten player position
    $game_player.straighten
    # Switch to name input screen
    $scene = Scene_Name.new
  end
  #--------------------------------------------------------------------------
  # * Menu Call
  #--------------------------------------------------------------------------
  def call_menu
    # Clear menu call flag
    $game_temp.menu_calling = false
    # If menu beep flag is set
    if $game_temp.menu_beep
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Clear menu beep flag
      $game_temp.menu_beep = false
    end
    # Straighten player position
    $game_player.straighten
    # Switch to menu screen
    $scene = Scene_Menu.new
  end
  #--------------------------------------------------------------------------
  # * Save Call
  #--------------------------------------------------------------------------
  def call_save
    # Straighten player position
    $game_player.straighten
    # Switch to save screen
    $scene = Scene_Save.new
  end
  #--------------------------------------------------------------------------
  # * Debug Call
  #--------------------------------------------------------------------------
  def call_debug
    # Clear debug call flag
    $game_temp.debug_calling = false
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Straighten player position
    $game_player.straighten
    # Switch to debug screen
    $scene = Scene_Debug.new
  end
  #--------------------------------------------------------------------------
  # * Player Place Move
  #--------------------------------------------------------------------------
  def transfer_player
    # Clear player place move call flag
    $game_temp.player_transferring = false
    # If move destination is different than current map
    if $game_map.map_id != $game_temp.player_new_map_id
      # Set up a new map
      $game_map.setup($game_temp.player_new_map_id)
    end
    # Set up player position
    $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
    # Set player direction
    case $game_temp.player_new_direction
    when 2  # down
      $game_player.turn_down
    when 4  # left
      $game_player.turn_left
    when 6  # right
      $game_player.turn_right
    when 8  # up
      $game_player.turn_up
    end
    # Straighten player position
    $game_player.straighten
    # Update map (run parallel process event)
    $game_map.update
    #heart meter
    @corazones.dispose##############################################[insert]
    @corazones = Window_Corazones.new###############################[insert]
    # Remake sprite set
    @spriteset.dispose
    @spriteset = Spriteset_Map.new
    # If processing transition
    if $game_temp.transition_processing
      # Clear transition processing flag
      $game_temp.transition_processing = false
      # Execute transition
      Graphics.transition(20)
    end
    # Run automatic change for BGM and BGS set on the map
    $game_map.autoplay
    # Frame reset
    Graphics.frame_reset
    # Update input information
    Input.update
  end
end

the heart meter loads up fine BUT, heart containers don't disappear when you lose HP and the fraction "10/10 hearts"
doesn't update unless you call menu then exit menu...

would it still be possible to enable and disable this through a switch or call script? (instead of having it always on)

(oh so close) can't wait to share this if/when we can get this to work
here's a sceenshot as to what it looks like,

this was the only "Heart Container / Heart Display System / Hearts for Health Meter 'script' I could find. ~g
« Last Edit: September 06, 2009, 06:35:04 PM by gameface101 »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, it looks like there's no update method for the window, which I think is kind of silly since it would be bad to refresh that every frame and it should really only be refreshed when hp is changed.

In any case, at the start of the update method, try putting:

Code: [Select]
old_hp = $game_party.members[0].hp

and then scroll down to where you have:


    @corazones.update################################################[insert]

and replace it with:

   
Code: [Select]
@corazones.refresh if old_hp != $game_party.members[0].hp

See if that works.


***
Rep:
Level 83
X-PLAT!
@modern algebra - I really appreciate your efforts in helping me out with this...

so here's the latest edit to Scene_Map:

Spoiler for:
Code: [Select]
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================

class Scene_Map
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make sprite set
    @spriteset = Spriteset_Map.new
    # Make message window
    @message_window = Window_Message.new
    # make heart meter
    @corazones = Window_Corazones.new###############################[insert]
    # Transition run
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of sprite set
    @spriteset.dispose
    # Dispose of message window
    @message_window.dispose
    #dispose of heart meter
    @corazones.dispose##################################################[insert]
    # If switching to title screen
    if $scene.is_a?(Scene_Title)
      # Fade out screen
      Graphics.transition
      Graphics.freeze
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    old_hp = $game_party.actors[0].hp###################################[insert]
    # 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
      unless $game_temp.player_transferring
        break
      end
      # Run place move
      transfer_player
      # Abort loop if transition processing
      if $game_temp.transition_processing
        break
      end
    end
    # Update sprite set
    @spriteset.update
    # Update message window
    @message_window.update
    #update heart meter
    @corazones.refresh if old_hp != $game_party.actors[0].hp############[insert]
    # If game over
    if $game_temp.gameover
      # Switch to game over screen
      $scene = Scene_Gameover.new
      return
    end
    # If returning to title screen
    if $game_temp.to_title
      # Change to title screen
      $scene = Scene_Title.new
      return
    end
    # If transition processing
    if $game_temp.transition_processing
      # Clear transition processing flag
      $game_temp.transition_processing = false
      # Execute transition
      if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
      end
    end
    # If showing message window
    if $game_temp.message_window_showing
      return
    end
    # If encounter list isn't empty, and encounter count is 0
    if $game_player.encounter_count == 0 and $game_map.encounter_list != []
      # If event is running or encounter is not forbidden
      unless $game_system.map_interpreter.running? or
             $game_system.encounter_disabled
        # Confirm troop
        n = rand($game_map.encounter_list.size)
        troop_id = $game_map.encounter_list[n]
        # If troop is valid
        if $data_troops[troop_id] != nil
          # Set battle calling flag
          $game_temp.battle_calling = true
          $game_temp.battle_troop_id = troop_id
          $game_temp.battle_can_escape = true
          $game_temp.battle_can_lose = false
          $game_temp.battle_proc = nil
        end
      end
    end
    # If B button was pressed
    if Input.trigger?(Input::B)
      # If event is running, or menu is not forbidden
      unless $game_system.map_interpreter.running? or
             $game_system.menu_disabled
        # Set menu calling flag or beep flag
        $game_temp.menu_calling = true
        $game_temp.menu_beep = true
      end
    end
    # If debug mode is ON and F9 key was pressed
    if $DEBUG and Input.press?(Input::F9)
      # Set debug calling flag
      $game_temp.debug_calling = true
    end
    # If player is not moving
    unless $game_player.moving?
      # Run calling of each screen
      if $game_temp.battle_calling
        call_battle
      elsif $game_temp.shop_calling
        call_shop
      elsif $game_temp.name_calling
        call_name
      elsif $game_temp.menu_calling
        call_menu
      elsif $game_temp.save_calling
        call_save
      elsif $game_temp.debug_calling
        call_debug
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Battle Call
  #--------------------------------------------------------------------------
  def call_battle
    # Clear battle calling flag
    $game_temp.battle_calling = false
    # Clear menu calling flag
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    # Make encounter count
    $game_player.make_encounter_count
    # Memorize map BGM and stop BGM
    $game_temp.map_bgm = $game_system.playing_bgm
    $game_system.bgm_stop
    # Play battle start SE
    $game_system.se_play($data_system.battle_start_se)
    # Play battle BGM
    $game_system.bgm_play($game_system.battle_bgm)
    # Straighten player position
    $game_player.straighten
    # Switch to battle screen
    $scene = Scene_Battle.new
  end
  #--------------------------------------------------------------------------
  # * Shop Call
  #--------------------------------------------------------------------------
  def call_shop
    # Clear shop call flag
    $game_temp.shop_calling = false
    # Straighten player position
    $game_player.straighten
    # Switch to shop screen
    $scene = Scene_Shop.new
  end
  #--------------------------------------------------------------------------
  # * Name Input Call
  #--------------------------------------------------------------------------
  def call_name
    # Clear name input call flag
    $game_temp.name_calling = false
    # Straighten player position
    $game_player.straighten
    # Switch to name input screen
    $scene = Scene_Name.new
  end
  #--------------------------------------------------------------------------
  # * Menu Call
  #--------------------------------------------------------------------------
  def call_menu
    # Clear menu call flag
    $game_temp.menu_calling = false
    # If menu beep flag is set
    if $game_temp.menu_beep
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Clear menu beep flag
      $game_temp.menu_beep = false
    end
    # Straighten player position
    $game_player.straighten
    # Switch to menu screen
    $scene = Scene_Menu.new
  end
  #--------------------------------------------------------------------------
  # * Save Call
  #--------------------------------------------------------------------------
  def call_save
    # Straighten player position
    $game_player.straighten
    # Switch to save screen
    $scene = Scene_Save.new
  end
  #--------------------------------------------------------------------------
  # * Debug Call
  #--------------------------------------------------------------------------
  def call_debug
    # Clear debug call flag
    $game_temp.debug_calling = false
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Straighten player position
    $game_player.straighten
    # Switch to debug screen
    $scene = Scene_Debug.new
  end
  #--------------------------------------------------------------------------
  # * Player Place Move
  #--------------------------------------------------------------------------
  def transfer_player
    # Clear player place move call flag
    $game_temp.player_transferring = false
    # If move destination is different than current map
    if $game_map.map_id != $game_temp.player_new_map_id
      # Set up a new map
      $game_map.setup($game_temp.player_new_map_id)
    end
    # Set up player position
    $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
    # Set player direction
    case $game_temp.player_new_direction
    when 2  # down
      $game_player.turn_down
    when 4  # left
      $game_player.turn_left
    when 6  # right
      $game_player.turn_right
    when 8  # up
      $game_player.turn_up
    end
    # Straighten player position
    $game_player.straighten
    # Update map (run parallel process event)
    $game_map.update
    #heart meter
    @corazones.dispose##################################################[insert]
    @corazones = Window_Corazones.new###################################[insert]
        # Remake sprite set
    @spriteset.dispose
    @spriteset = Spriteset_Map.new
    # If processing transition
    if $game_temp.transition_processing
      # Clear transition processing flag
      $game_temp.transition_processing = false
      # Execute transition
      Graphics.transition(20)
    end
    # Run automatic change for BGM and BGS set on the map
    $game_map.autoplay
    # Frame reset
    Graphics.frame_reset
    # Update input information
    Input.update
    #
   
  end
end

at the beginning of the update method I used:
Code: [Select]
old_hp = $game_party.actors[0].hp

and then replaced the other line with:
Code: [Select]
@corazones.refresh if old_hp != $game_party.actors[0].hp

the fraction updates n/p!

now the last remaining issue is to make the heart containers disappear according to the fraction...
currently all 10 heart containers remain present after damage has been recieved...
(almost there! ^,^) ~g


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Why do you want them to disappear? It's a good way to show Max HP.

***
Rep:
Level 83
X-PLAT!
@modern algebra - if not disappear, for the fill to empty...
just like any Zelda knock off...

for me, it just doesn't make sense to show an array of ten filled hearts
when you're down to your last hit.




*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
It doesn't make them unfill?

I really don't like this script.

***
Rep:
Level 83
X-PLAT!
well I've continued my search for support on this script, instead of the French, ...
the Spanish had a site with the same script by DarkRog...
this time with a little extra piece of code at the bottom for the "C_Color" method...
here's the latest edit on this script:
Spoiler for:
Code: [Select]
#==============================================================================
# Window_Corazones by DarkRog 2006
# currently being Translated and Modified
# by GameFace101 2009
#
# Options:
# 0: Nothing. 1: Hero name. 2: Value/MaxValue. 3: x hearts/Maxhearts. 4: %.
#------------------------------------------------------------------------------
#==============================================================================

class Window_Corazones < Window_Base

   def initialize
     super(-8, -8, 640, 96)
      #=== Options ===
      corazones = 10
      opacidad = 255
      opcion = 3#1-4
      #=== Options fin ==
      self.contents = Bitmap.new(width - 32, height - 32)
      self.contents.font.name = "Impact"#$fontface
      self.contents.font.size = 24#$fontsize
      self.opacity = 0
      @hearts = corazones
      @opacity = opacidad
      @option = opcion
      @hr = 0
      refresh
   end
  
   #-----------------------------------------------------------------------
   # - Actualisation
   #-----------------------------------------------------------------------
   def refresh
      self.contents.clear
      @n = $game_party.actors[0].hp
      @mn = $game_party.actors[0].maxhp
      #n is the value, and mn the maxvalue:
      @hr = 0
      @lh = 0
      
      for i in 0..@hearts-1
         self.contents.fill_rect(i*14, 4, 1, 2, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+1, 3, 1, 4, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+2, 2, 1, 6, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+3, 1, 1, 8, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+4, 0, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+5, 1, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+6, 2, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+7, 1, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+8, 0, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+9, 1, 1, 8, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+10, 2, 1, 6, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+11, 3, 1, 4, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*14+12, 4, 1, 2, Color.new(0, 0, 0, @opacity))
         #
         self.contents.fill_rect(i*14+1, 4, 1, 2, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+2, 3, 1, 4, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+3, 2, 1, 6, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+4, 1, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+5, 2, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+6, 3, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+7, 2, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+8, 1, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+9, 2, 1, 6, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+10, 3, 1, 4, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*14+11, 4, 1, 2, Color.new(255, 255, 255, @opacity))
         #
         @c = 255
         @l = @n*100/@mn
         @ho = @l*@hearts
         c_color(1)
         self.contents.fill_rect(i*14+2, 4, 1, 2, Color.new(@c, 0, 0, @opacity))
         c_color(2)
         self.contents.fill_rect(i*14+3, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
         c_color(3)
         self.contents.fill_rect(i*14+4, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(4)
         self.contents.fill_rect(i*14+5, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(5)
         self.contents.fill_rect(i*14+6, 4, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(6)
         self.contents.fill_rect(i*14+7, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(7)
         self.contents.fill_rect(i*14+8, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(8)
         self.contents.fill_rect(i*14+9, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
         c_color(9)
         self.contents.fill_rect(i*14+10, 4, 1, 2, Color.new(@c, 0, 0, @opacity))

         @hr += 1
      end
###########################################################[options]      
      if @option == 1
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, $game_party.actors[0].name, 0)
      elsif @option == 2
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@n}/#{@mn}", 0)
      elsif @option == 3
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@ho/100}/#{@hearts}", 0)
      elsif @option == 4
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@l}%", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@l}%", 0)
      end
   end
  
 end
############################################[color method]
 def c_color(a)
if @hr <= (@ho/100)-1
@c = 255 #
else
if @ho/10-@hr*10 >= a and @ho/10-@hr*10 <= 9

@c = 255 #
else
@c = 0 #
end
end
end
##############################################[need?]
#def corazones(corazones)
#@hearts = corazones
#end

and here's the latest edit to Scene_Map thanks to Modern Algebra!
Spoiler for:
Code: [Select]
#==============================================================================
# ** Scene_Map (edited for Heart Meter Script by GameFace101)
# a special thanks goes out to Modern Algebra rmrk.net!
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================

class Scene_Map
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make sprite set
    @spriteset = Spriteset_Map.new
    # Make message window
    @message_window = Window_Message.new
    # make heart meter
    @corazones = Window_Corazones.new###################################[insert]
    # Transition run
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of sprite set
    @spriteset.dispose
    # Dispose of message window
    @message_window.dispose
    #dispose of heart meter
    @corazones.dispose##################################################[insert]
    # If switching to title screen
    if $scene.is_a?(Scene_Title)
      # Fade out screen
      Graphics.transition
      Graphics.freeze
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    old_hp = $game_party.actors[0].hp###################################[insert]
    # 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
      unless $game_temp.player_transferring
        break
      end
      # Run place move
      transfer_player
      # Abort loop if transition processing
      if $game_temp.transition_processing
        break
      end
    end
    # Update sprite set
    @spriteset.update
    # Update message window
    @message_window.update
    #update heart meter
    @corazones.update###################################################[insert]
    @corazones.refresh if old_hp != $game_party.actors[0].hp############[insert]
    # If game over
    if $game_temp.gameover
      # Switch to game over screen
      $scene = Scene_Gameover.new
      return
    end
    # If returning to title screen
    if $game_temp.to_title
      # Change to title screen
      $scene = Scene_Title.new
      return
    end
    # If transition processing
    if $game_temp.transition_processing
      # Clear transition processing flag
      $game_temp.transition_processing = false
      # Execute transition
      if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
      end
    end
    # If showing message window
    if $game_temp.message_window_showing
      return
    end
    # If encounter list isn't empty, and encounter count is 0
    if $game_player.encounter_count == 0 and $game_map.encounter_list != []
      # If event is running or encounter is not forbidden
      unless $game_system.map_interpreter.running? or
             $game_system.encounter_disabled
        # Confirm troop
        n = rand($game_map.encounter_list.size)
        troop_id = $game_map.encounter_list[n]
        # If troop is valid
        if $data_troops[troop_id] != nil
          # Set battle calling flag
          $game_temp.battle_calling = true
          $game_temp.battle_troop_id = troop_id
          $game_temp.battle_can_escape = true
          $game_temp.battle_can_lose = false
          $game_temp.battle_proc = nil
        end
      end
    end
    # If B button was pressed
    if Input.trigger?(Input::B)
      # If event is running, or menu is not forbidden
      unless $game_system.map_interpreter.running? or
             $game_system.menu_disabled
        # Set menu calling flag or beep flag
        $game_temp.menu_calling = true
        $game_temp.menu_beep = true
      end
    end
    # If debug mode is ON and F9 key was pressed
    if $DEBUG and Input.press?(Input::F9)
      # Set debug calling flag
      $game_temp.debug_calling = true
    end
    # If player is not moving
    unless $game_player.moving?
      # Run calling of each screen
      if $game_temp.battle_calling
        call_battle
      elsif $game_temp.shop_calling
        call_shop
      elsif $game_temp.name_calling
        call_name
      elsif $game_temp.menu_calling
        call_menu
      elsif $game_temp.save_calling
        call_save
      elsif $game_temp.debug_calling
        call_debug
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Battle Call
  #--------------------------------------------------------------------------
  def call_battle
    # Clear battle calling flag
    $game_temp.battle_calling = false
    # Clear menu calling flag
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    # Make encounter count
    $game_player.make_encounter_count
    # Memorize map BGM and stop BGM
    $game_temp.map_bgm = $game_system.playing_bgm
    $game_system.bgm_stop
    # Play battle start SE
    $game_system.se_play($data_system.battle_start_se)
    # Play battle BGM
    $game_system.bgm_play($game_system.battle_bgm)
    # Straighten player position
    $game_player.straighten
    # Switch to battle screen
    $scene = Scene_Battle.new
  end
  #--------------------------------------------------------------------------
  # * Shop Call
  #--------------------------------------------------------------------------
  def call_shop
    # Clear shop call flag
    $game_temp.shop_calling = false
    # Straighten player position
    $game_player.straighten
    # Switch to shop screen
    $scene = Scene_Shop.new
  end
  #--------------------------------------------------------------------------
  # * Name Input Call
  #--------------------------------------------------------------------------
  def call_name
    # Clear name input call flag
    $game_temp.name_calling = false
    # Straighten player position
    $game_player.straighten
    # Switch to name input screen
    $scene = Scene_Name.new
  end
  #--------------------------------------------------------------------------
  # * Menu Call
  #--------------------------------------------------------------------------
  def call_menu
    # Clear menu call flag
    $game_temp.menu_calling = false
    # If menu beep flag is set
    if $game_temp.menu_beep
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Clear menu beep flag
      $game_temp.menu_beep = false
    end
    # Straighten player position
    $game_player.straighten
    # Switch to menu screen
    $scene = Scene_Menu.new
  end
  #--------------------------------------------------------------------------
  # * Save Call
  #--------------------------------------------------------------------------
  def call_save
    # Straighten player position
    $game_player.straighten
    # Switch to save screen
    $scene = Scene_Save.new
  end
  #--------------------------------------------------------------------------
  # * Debug Call
  #--------------------------------------------------------------------------
  def call_debug
    # Clear debug call flag
    $game_temp.debug_calling = false
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Straighten player position
    $game_player.straighten
    # Switch to debug screen
    $scene = Scene_Debug.new
  end
  #--------------------------------------------------------------------------
  # * Player Place Move
  #--------------------------------------------------------------------------
  def transfer_player
    # Clear player place move call flag
    $game_temp.player_transferring = false
    # If move destination is different than current map
    if $game_map.map_id != $game_temp.player_new_map_id
      # Set up a new map
      $game_map.setup($game_temp.player_new_map_id)
    end
    # Set up player position
    $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
    # Set player direction
    case $game_temp.player_new_direction
    when 2  # down
      $game_player.turn_down
    when 4  # left
      $game_player.turn_left
    when 6  # right
      $game_player.turn_right
    when 8  # up
      $game_player.turn_up
    end
    # Straighten player position
    $game_player.straighten
    # Update map (run parallel process event)
    $game_map.update
    # remake heart meter?
    #@corazones.dispose#################################################[insert]
    #@corazones = Window_Corazones.new##################################[insert]
    #@corazones.refresh#################################################[insert]
        # Remake sprite set
    @spriteset.dispose
    @spriteset = Spriteset_Map.new
    # If processing transition
    if $game_temp.transition_processing
      # Clear transition processing flag
      $game_temp.transition_processing = false
      # Execute transition
      Graphics.transition(20)
    end
    # Run automatic change for BGM and BGS set on the map
    $game_map.autoplay
    # Frame reset
    Graphics.frame_reset
    # Update input information
    Input.update
    #
    
  end
end

now here's my remaining challenges:
1.) use a switch or call script to turn off/on
2.) add more hearts as the game progresses
  

@modern algebra - thank you for your efforts, if there's anything you're looking for such as resources, etc...
allow me to return the favor... I really do appreciate you for helping me out on this...
(oh so close to resurrecting this crappy script for being such a cool idea ~g)

 
« Last Edit: September 07, 2009, 10:49:32 AM by gameface101 »

***
Rep:
Level 83
X-PLAT!
a few more things I would like to mention is that
this script doesn't require any graphics
the script itself draws the hearts!
another cool thing about this is that
you got options!
0 = nothing
1 = displays actor's name
2 = show value/max
3 = show hearts/max
4 = HP percentage
 
oh! and here's the latest screenshot!


now only if this had a switch to set on/off
and a way to add more hearts when you progress... ~g

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
For adding a switch, just go to where you put in the refresh method and put this line below it:

Code: [Select]
@corazones.visible = $game_switches[x]

Where x is the ID of the switch you want it to work with.


Adding hearts isn't very hard either; all you need to do is change the @hearts variable of the corazones window. To make it dynamic, all you will need to do is add to the script to make it so that that is not fixed at 10, but is instead based off of a variable that can be changed in Game_Actor.

***
Rep:
Level 83
X-PLAT!
@modern algebra - man you rock!  we're like 99% there...

the switch works like a charm ^,^

now for dynamically adding more hearts!
I have no idea where to begin with editing the Game_Actor script....

so what I've done was replace
Code: [Select]
corazones = 3
with
Code: [Select]
corazones = @value=$game_variables[2]
to control the amount of heart containers
based off the value of a variable...
 
Now the last and final challenge is....
to get this setting to update or refresh
as the variable's value changes in game.

*though I've really learned a lot,
I know I have a lot more to learn when it comes to scripting...
thanks again for sharing your wisdom!

~g

 

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
At the start of the refresh method of the window, include this code:

Code: [Select]
@hearts = $game_variables[2]

***
Rep:
Level 83
X-PLAT!
@modern algebra - I tried including the code above to the refresh method in Scene_Map
along with a few other attempts... no luck.

just wondering... should I try a similar method to the one used for refreshing HP?
Code: [Select]
old_hp = $game_party.actors[0].hp
and then below
Code: [Select]
@corazones.refresh if old_hp != $game_party.actors[0].hp


along with an "else"???
and then something like...

Code: [Select]
heart = $game_variables[2]
and then below
Code: [Select]
@corazones.refresh if heart !=$game_variables[2]

"?"

giving my best effort towards the final solution. ~g

« Last Edit: September 08, 2009, 12:56:49 AM by gameface101 »

*
Rep:
Level 102
2014 Biggest Narcissist Award2014 Biggest Forum Potato2014 Best Non-RM Creator2013 Best Game Creator (Non-RM)2013 Best IRC ChatterboxParticipant - GIAW 112012 Most Successful Troll2012 Funniest Member2012 Best Use Of Avatar and Signature space2012 Best IRC ChatterboxSecret Santa 2012 ParticipantProject of the Month winner for November 2009For being a noted contributor to the RMRK Wiki2010 Most Successful Troll2010 Biggest Forum Couch Potato2010 Best IRC Chatterbox
I think it may be easier to make this with events, if you're having trouble with scripting.

***
Rep:
Level 83
X-PLAT!
@Irock - well it's just down to figuring out one more thing...

the refresh/update method for when more hearts are added by changing the variable.
right now I'm able to do so by calling the menu/ exiting menu...

modern algebra has been so kind to get me this far...
it's just a matter of time as to what line of code and where it goes. ~g



*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
@modern algebra - I tried including the code above to the refresh method in Scene_Map
along with a few other attempts... no luck.


Not in Scene_Map, in Window_Corazones

***
Rep:
Level 83
X-PLAT!

Quote
Not in Scene_Map, in Window_Corazones

@modern algebra - yeah I tried that in my "other attempts"

right now I'm currently working on an alias method with Scene_Map so that it's just one script to mess with...
once that's done it maybe a little easier to figure out how to update/refresh both HP and amount of Hearts.

I know anythings possible through events,
but who wouldn't appreciate a plug in play script
that displays Hearts for HP
with lots of options to customize
and doesn't require any graphics???

you are definitely getting a special thanks for hanging in there with me...~g
 

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Are you sure you tried that in one of your other attempts?

If so, where did you put it?

Because I'm certain it will work.

***
Rep:
Level 83
X-PLAT!
@modern algebra - I had placed
Code: [Select]
@hearts = $game_variables[2]
below
Code: [Select]
def refresh
in the Heart script.... still had the same issue (call menu/exit menu to update/refresh)

right now I have the script working through an alias method with Scene_Map
(leaving Scene_Map "untouched")
here my latest edits:
Spoiler for:
Code: [Select]
class Window_Corazones < Window_Base

   def initialize
     super(-8, 410, 640, 96)############################[window position & size]

#[SETTINGS]     

#corazones = 10 #use this setting for a fixed number of hearts. or...
corazones = @value=$game_variables[2]#to control amount of hearts by variable.
opacidad = 255 #opacity: 0= invisible to 255= solid
opcion = 1 #info text, review the options below:

#[OPTIONS]

# Corazones = (number of hearts you wish to display)
# Opacidad  = (how clear or soild in appearance)   
# Options   = (settings for information text)
# 0=Blank 1=Hero name 2=Value/MaxValue 3=Hearts/Maxhearts 4=HP%

      self.contents = Bitmap.new(width - 32, height - 32)
      self.contents.font.name = "Impact"#---------------------------=[FONT TYPE]
      self.contents.font.size = 24#---------------------------------=[FONT SIZE]
      self.z = 3000#-------------------------------------------------=[BLENDING]
      self.opacity = 0 #------------------------------------------=[WINDOW SKIN]
      @hearts = corazones
      @opacity = opacidad
      @option = opcion
      @hr = 0
      refresh
      end
      def refresh
      @hearts = $game_variables[2] 
      self.contents.clear
      @corazones = $game_variables[2]##################################[insert]
      @n = $game_party.actors[0].hp
      @mn = $game_party.actors[0].maxhp
      #n is the value, and mn the maxvalue:
      @hr = 0
      @lh = 0
###############################################################[black for empty]           
      for i in 0..@hearts-1
         self.contents.fill_rect(i*24, 4, 1, 2, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+1, 3, 1, 4, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+2, 2, 1, 6, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+3, 1, 1, 8, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+4, 0, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+5, 1, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+6, 2, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+7, 1, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+8, 0, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+9, 1, 1, 8, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+10, 2, 1, 6, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+11, 3, 1, 4, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+12, 4, 1, 2, Color.new(0, 0, 0, @opacity))
#############################################################[white for outline]     
         self.contents.fill_rect(i*24+1, 4, 1, 2, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+2, 3, 1, 4, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+3, 2, 1, 6, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+4, 1, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+5, 2, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+6, 3, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+7, 2, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+8, 1, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+9, 2, 1, 6, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+10, 3, 1, 4, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+11, 4, 1, 2, Color.new(255, 255, 255, @opacity))
#######################################################################[fill in]
         @c = 255
         @l = @n*100/@mn
         @ho = @l*@hearts
         c_color(1)
         self.contents.fill_rect(i*24+2, 4, 1, 2, Color.new(@c, 0, 0, @opacity))
         c_color(2)
         self.contents.fill_rect(i*24+3, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
         c_color(3)
         self.contents.fill_rect(i*24+4, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(4)
         self.contents.fill_rect(i*24+5, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(5)
         self.contents.fill_rect(i*24+6, 4, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(6)
         self.contents.fill_rect(i*24+7, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(7)
         self.contents.fill_rect(i*24+8, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(8)
         self.contents.fill_rect(i*24+9, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
         c_color(9)
         self.contents.fill_rect(i*24+10, 4, 1, 2, Color.new(@c, 0, 0, @opacity))

         @hr += 1
       end
       
##############################################[need update]
def update
#super
@corazones.visible = $game_switches[2]##################################[insert]
refresh
end
       
#######################################################################[options]     
      if @option == 1
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, $game_party.actors[0].name, 0)
      elsif @option == 2
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@n}/#{@mn}", 0)
      elsif @option == 3
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@ho/100}/#{@hearts}", 0)
      elsif @option == 4
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@l}%", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@l}%", 0)
      end
   end
 
end
##################################################################[color method]
def c_color(a)
if @hr <= (@ho/100)-1
@c = 255 #
else
if @ho/10-@hr*10 >= a and @ho/10-@hr*10 <= 9

@c = 255 #
else
@c = 0 #
end
end
end
################################################################################



########################################################################[insert]
# Scene_Map #
#############
class Scene_Map
alias gface1_main main
def main #MAIN
@Corazones = Window_Corazones.new#######################################[insert]
gface1_main
@Corazones.dispose######################################################[insert]
end
alias gface1_update update
def update #UPDATE
gface1_update
old_hp = $game_party.actors[0].hp#######################################[insert]
      $corazones.refresh if old_hp != $game_party.actors[0].hp##########[insert]
      end
   end

try not to laugh ^,^ - it works!
this time it has the same issues with updating/refreshing
(having to call menu/exit menu to update/refresh)
but not only is it the amount of hearts it's HP as well
oh and the switch won't work  X(

at least it's down to editing one script
which should make it a little easier to code. ~g
« Last Edit: September 08, 2009, 09:28:34 PM by gameface101 »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Code: [Select]
def main #MAIN
@Corazones = Window_Corazones.new#######################################[insert]
gface1_main
@Corazones.dispose######################################################[insert]
end
alias gface1_update update
def update #UPDATE
gface1_update
old_hp = $game_party.actors[0].hp#######################################[insert]
      $corazones.refresh if old_hp != $game_party.actors[0].hp##########[insert]
        break
      end
   end

You have corazones as a global variable when you refresh it (it should be @, not $)

Also, you shouldn't capitalize the names of variables, so @corazones, not @Corazones.

That's just a convention though.

***
Rep:
Level 83
X-PLAT!
@modern algebra - Ok, I cleaned it up and got the switch working again...
                          now I'm trying to get the HP working as it did when
                          the Scene_Map was edited... so close~ and now it's just one script ^,^
                          muchas gracias amigo! this wouldn't of been possible if it weren't for you ~g

here's the latest screen shot:

and here's the latest edit to the script:
Spoiler for:
Code: [Select]
class Window_Corazones < Window_Base

   def initialize
     super(-8, 410, 640, 96)############################[window position & size]

#[SETTINGS]    

#corazones = 10 #use this setting for a fixed number of hearts. or...
corazones = $game_variables[2]#to control amount of hearts by variable.
opacidad = 255 #opacity: 0= invisible to 255= solid
opcion = 1 #info text, review the options below:

#[OPTIONS]

# Corazones = (number of hearts you wish to display)
# Opacidad  = (how clear or soild in appearance)    
# Options   = (settings for information text)
# 0=Blank 1=Hero name 2=Value/MaxValue 3=Hearts/Maxhearts 4=HP%

      self.contents = Bitmap.new(width - 32, height - 32)
      self.contents.font.name = "Impact"#---------------------------=[FONT TYPE]
      self.contents.font.size = 24#---------------------------------=[FONT SIZE]
      self.z = 3000#-------------------------------------------------=[BLENDING]
      self.opacity = 0 #------------------------------------------=[WINDOW SKIN]
      @hearts = corazones
      @opacity = opacidad
      @option = opcion
      @hr = 0
      refresh
      end
      def refresh
      @hearts = $game_variables[2]######################################[insert]  
      self.contents.clear
      @n = $game_party.actors[0].hp
      @mn = $game_party.actors[0].maxhp
      #n is the value, and mn the maxvalue:
      @hr = 0
      @lh = 0
###############################################################[black for empty]            
      for i in 0..@hearts-1
         self.contents.fill_rect(i*24, 4, 1, 2, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+1, 3, 1, 4, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+2, 2, 1, 6, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+3, 1, 1, 8, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+4, 0, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+5, 1, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+6, 2, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+7, 1, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+8, 0, 1, 10, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+9, 1, 1, 8, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+10, 2, 1, 6, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+11, 3, 1, 4, Color.new(0, 0, 0, @opacity))
         self.contents.fill_rect(i*24+12, 4, 1, 2, Color.new(0, 0, 0, @opacity))
#############################################################[white for outline]      
         self.contents.fill_rect(i*24+1, 4, 1, 2, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+2, 3, 1, 4, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+3, 2, 1, 6, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+4, 1, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+5, 2, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+6, 3, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+7, 2, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+8, 1, 1, 8, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+9, 2, 1, 6, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+10, 3, 1, 4, Color.new(255, 255, 255, @opacity))
         self.contents.fill_rect(i*24+11, 4, 1, 2, Color.new(255, 255, 255, @opacity))
#######################################################################[fill in]
         @c = 255
         @l = @n*100/@mn
         @ho = @l*@hearts
         c_color(1)
         self.contents.fill_rect(i*24+2, 4, 1, 2, Color.new(@c, 0, 0, @opacity))
         c_color(2)
         self.contents.fill_rect(i*24+3, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
         c_color(3)
         self.contents.fill_rect(i*24+4, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(4)
         self.contents.fill_rect(i*24+5, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(5)
         self.contents.fill_rect(i*24+6, 4, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(6)
         self.contents.fill_rect(i*24+7, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(7)
         self.contents.fill_rect(i*24+8, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
         c_color(8)
         self.contents.fill_rect(i*24+9, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
         c_color(9)
         self.contents.fill_rect(i*24+10, 4, 1, 2, Color.new(@c, 0, 0, @opacity))

         @hr += 1
       end
      
########################################################################[update]
#def update ?
#######################################################################[options]      
      if @option == 1
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, $game_party.actors[0].name, 0)
      elsif @option == 2
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@n}/#{@mn}", 0)
      elsif @option == 3
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@ho/100}/#{@hearts}", 0)
      elsif @option == 4
         self.contents.font.color.set(0, 0, 0)
         self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@l}%", 0)
         self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@l}%", 0)
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 7, 160, 32, "#{@l}%", 0)
      end
   end
 
end
##################################################################[color method]
def c_color(a)
if @hr <= (@ho/100)-1
@c = 255 #
else
if @ho/10-@hr*10 >= a and @ho/10-@hr*10 <= 9

@c = 255 #
else
@c = 0 #
end
end
end
################################################################################



########################################################################[insert]
# Scene_Map #
#############
class Scene_Map
alias gface1_main main
def main #MAIN
@corazones = Window_Corazones.new#######################################[insert]
gface1_main
@corazones.dispose######################################################[insert]
end
alias gface1_update update
def update #UPDATE
gface1_update
old_hp = $game_party.actors[0].hp#######################################[insert]
      @corazones.refresh if old_hp != $game_party.actors[0].hp##########[insert]
      @corazones.visible = $game_switches[2]############################[insert]
      end
   end
« Last Edit: September 08, 2009, 11:22:54 PM by gameface101 »

***
Rep:
Level 83
X-PLAT!
ALRIGHT! - DarkRog, if you're still out there... I just want to say
I hope you like what I've done to your script!
with the help from Modern Algebra, this new version has

+ an alias method with Scene_Map, just copy and paste one script!
+ 1 switch for display, enable or disable display!
+ 1 variable for amount of hearts, instead of a fixed number
 

I'm posting a new thread with the current working script
for the world to enjoy to gather feedback and offer user support.
http://rmrk.net/index.php/topic,34731.0.html

and I would like to continue this thread for continuous improvement...

more customizations to this script:

- vertical alignment option
- animations transitions
- custom graphics
- and better coding


 ~g/A\/\/\|E|F/A\(C|=l
« Last Edit: September 11, 2009, 06:40:02 AM by gameface101 »

***
Rep:
Level 83
X-PLAT!
would anyone possibly know how to make a "star shape" instead of a heart???

I would like to use this for MP as well...? that's right "Star Containers for SP!"

still working on vertical alignment... ~g

« Last Edit: September 20, 2009, 10:04:17 AM by gameface101 »