DeM0nFiRe's KH Health Bar

DeM0nFiRe's Kingdom Hearts Health Bar
Current Version: 1.0(07/16/07)

Preface/General Info:
This script shows the first party member's health on a curved bar, like in Kingdom hearts, not to hard to figure out.

How to Install: Insert this script above main. Then you must make pictures for the curved part of the bar at 61-100%. These pictures should be named "KH_x" where xx is the percent. the next version of the script will draw the curve for you, but I needed a version out now.

To Use: 1.Put "@healthbar = Sprite_KHBar.new" right below
"@message_window = Window_Message.new" in Scene_Map
2.Put "@healthbar.update" right below "loop do" in Scene_Map
3.Play!
NOTE!: To use this script non-commercially, you MUST credit DeM0nFiRe, To use in a commercial project, please conatact DeM0nFiRe

The Script Spoiler
################################################################################
#Title: Kingdom Hearts Health Bar V1.0 (07/16/07)###############################
################################################################################
#Scripter: DeM0nFiRe############################################################
################################################################################
#To Use: 1.Put "@healthbar = Sprite_KHBar.new" right below "@message_window =###
#########  Window_Message.new" in Scene_Map#####################################
#########2.Put "@healthbar.update" right below "loop do" in Scene_Map###########
#########3.Play!################################################################
################################################################################
#To Install: Insert this script above main. Then you must make pictures for the#
#curved part of the bar at 61-100%. These pictures should be named "KH_x" where#
#where xx is the percent. the next version of the script will draw the curve####
#for you, but I needed a version out now.#######################################
################################################################################
#NOTE!: To use this script non-commercially, you MUST credit DeM0nFiRe, To use##
#in a commercial project, please conatact DeM0nFiRe#############################
################################################################################
class Sprite_KHBar < Sprite
#--------------------
  def initialize
    super
    self.bitmap = Bitmap.new(200, 200)
    self.x = 640 - self.bitmap.width
    self.y = 200
    self.z = 500
    @health = $game_party.actors[0].hp * 100
    @maxhealth = $game_party.actors[0].maxhp
    @frame = (@health / @maxhealth)
    update
  end
#--------------------
  def dispose
    if self.bitmap != nil
      self.bitmap.dispose
    end
    super
  end
#--------------------
  def update
    color = Color.new(36, 185, 63)
    @health = $game_party.actors[0].hp * 100
    @maxhealth = $game_party.actors[0].maxhp
    if @frame != (@health / @maxhealth)
      self.bitmap.clear
      @frame =  * (@health / @maxhealth)     
    end
    case @frame.round
    when 0
    when 1
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 2
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 3
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 4
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 5
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 6
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 7
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 8
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 9
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 10
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 11
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 12
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 13
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 14
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 15
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 16
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 17
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 18
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 19
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 20
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 21
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 22
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 23
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 24
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 25
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 26
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 27
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 28
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 29
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 30
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 31
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 32
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 33
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 34
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 35
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 36
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 37
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 38
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 39
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 40
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 41
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 42
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 43
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 44
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 45
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 46
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 47
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 48
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 49
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 50
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 51
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 52
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 53
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 54
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 55
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 56
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 57
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 58
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 59
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 60
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 61
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_61")
    when 62
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_62")
    when 63
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_63")
    when 64
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_64")
    when 65
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_65")
    when 66
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_66")
    when 67
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_67")
    when 68
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_68")
    when 69
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_69")
    when 70
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_70")
    when 71
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_71")
    when 72
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_72")
    when 73
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_73")
    when 74
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_74")
    when 75
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_75")
    when 76
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_76")
    when 77
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_77")
    when 78
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_78")
    when 79
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_79")
    when 80
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_80")
    when 81
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_81")
    when 82
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_82")
    when 83
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_83")
    when 84
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_84")
    when 85
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_85")
    when 86
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_86")
    when 87
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_87")
    when 88
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_88")
    when 89
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_89")
    when 90
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_90")
    when 91
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_91")
    when 92
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_92")
    when 93
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_93")
    when 94
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_94")
    when 95
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_95")
    when 96
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_96")
    when 97
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_97")
    when 98
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_98")
    when 99
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_99")
    when 100
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_99")
    end
  end
end
Expand to see the code.


Questions and feedback are welcome.
lol
That's a very crowded heading you got! :P

Gotta try this out, nice work!
umm yeah I didn't like the header :P

1.)
Please tell me you didn't type all of this out :-/

Code Spoiler
    when 1
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 2
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 3
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 4
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 5
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 6
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 7
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 8
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 9
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 10
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 11
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 12
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 13
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 14
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 15
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 16
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 17
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 18
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 19
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 20
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 21
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 22
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 23
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 24
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 25
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 26
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 27
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 28
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 29
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 30
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 31
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 32
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 33
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 34
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 35
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 36
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 37
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 38
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 39
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 40
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 41
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 42
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 43
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 44
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 45
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 46
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 47
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 48
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 49
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 50
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 51
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 52
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 53
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 54
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 55
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 56
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 57
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 58
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 59
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
    when 60
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
Expand to see the code.
you could have just used

when 1..60
  self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
Expand to see the code.
Next
    when 61
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_61")
    when 62
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_62")
    when 63
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_63")
    when 64
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_64")
    when 65
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_65")
    when 66
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_66")
    when 67
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_67")
    when 68
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_68")
    when 69
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_69")
    when 70
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_70")
    when 71
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_71")
    when 72
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_72")
    when 73
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_73")
    when 74
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_74")
    when 75
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_75")
    when 76
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_76")
    when 77
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_77")
    when 78
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_78")
    when 79
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_79")
    when 80
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_80")
    when 81
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_81")
    when 82
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_82")
    when 83
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_83")
    when 84
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_84")
    when 85
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_85")
    when 86
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_86")
    when 87
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_87")
    when 88
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_88")
    when 89
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_89")
    when 90
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_90")
    when 91
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_91")
    when 92
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_92")
    when 93
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_93")
    when 94
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_94")
    when 95
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_95")
    when 96
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_96")
    when 97
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_97")
    when 98
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_98")
    when 99
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      @curve.bitmap = RPG::Cache.picture("KH_99")
    when 100
      self.bitmap.fill_rect(0,170,120,10,color)
      @curve = Sprite.new
      [COLOR=Red]@curve.bitmap = RPG::Cache.picture("KH_99")[/COLOR]
Expand to see the code.
could have been

  when 61..100
    self.bitmap.fill_rect(0,170,120,10,color)
    @curve = Sprite.new
    @curve.bitmap = RPG::Cache.picture("KH_#{@frame}")
Expand to see the code.


on another note what's with the code in read above????


2.)
ok next
[COLOR=Red]    when 0[/COLOR]
    when 1
      self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
Expand to see the code.
If you aren't going to do anything with it then why have it there :p

3.)
well I do not agree with the way you coded your update method. the way you did it it will ALWAYS redraw/draw over the bar every frame since

    @health = $game_party.actors[0].hp * 100
    @maxhealth = $game_party.actors[0].maxhp
    if @frame != (@health / @maxhealth)
      self.bitmap.clear
      @frame =  * (@health / @maxhealth)     
    end
    #draw the bar code here
Expand to see the code.
you don't have anything to skip the drawing code if the percentage is the same add an else cause to make it exit the method if @frame == @health / @maxhealth

4.)
I don't really think @health and @maxhealth should be declared as instance variables since you can just do this instead

@frame = $game_party.actors[0].hp * 100 / $game_party.actors[0].maxhp
Expand to see the code.


Hehe other than that good job, but this can still benefit from refining.
Heh, actually all that stuff you mentioned, Trickster, kept me awake last night. Unfortunately, Sasuke needed this script fast so I kinda just made it work, not necessarily work well. I plan on fixing all of those rhings and adding some new features to it. I'll probably fix some of the bigger mistakes later on today.

Thanks for pointing those out.

1.)heh heh, no way, that was copy and paste. :D

2.)That was there because I was trying a few different ways to draw the bar, and some of them involved that "when 0". I never got around to deleting it in case I used it again.

3.)Actually, when I fix it I plan on doing it a little differently.

4.)Yeah true, but I was trying a few different things and I didn't have time to fix that either.

And Lastly: Yeah sorry about the ugly header, I haven't the slightest idea what I was doing.
Thanks for the script... It may inspire more Kingdom Hearts Fangame Hopefuls... But Thanks for the script again... Awesome Scripter.
Hey, let me know if it works properly.
Where is the dispose?
Can anyone make a demo???
I don't know how to set the pictures.
I can make one in a day or so... if I don't forget... I'll make the script custimizable too.... My script is different from DemonFires but it's basically setup the same...
I also plan on still fixing the problems with mine, and making it better than it is now. I'v just been a little busy.
http://www.megaupload.com/?d=LAKEXIOZ

It's probably encrypted but if it isn't awesome... Tell me if it is... Remember Don't credit me for anything... Not even the edits... It's DemonFire's script...
Since I'm downloading it, may I ask ; This has the face thing right?

EDIT : What do you mean encrypted?
It is encrypted. Encrypted is when you can't edit it in RMXP or get to the graphics files.
Why did you encrypt it when you didn't mean to sasuke89. :|
Does it work? I'll probably post tomorrow with the demo unless I'm not bored.
It works but i's not that KH....anyway I know what's encrypted....it's just I didn't get what he said. It doesn't have KH style because it has the Battle Dungeon style to it but it still has that face thingy. Anyway great script DemonFire....but I still don't know how to set the bars up....
Yeah... I made a better one... It's just I'll need to upload again...
Hmm, the script does need refining. It lags quite a bit. Both healing and getting hurt.
It's supposed to... I made it that way because I could make the animation stay in that position for more than a frame... So I put a wait count count to make it stay for 10... So I made it lag on purpose.. lol... Thanks for posting... I nearly forgot about the script I'll post an Unencrypted one later today.


EIDT:::

http://www.megaupload.com/?d=Y5FFUBZS
There are alot of problems with it, but They will be fixed. As the script is, it is still usable.
What must i do to show 3 HUD?s ? ( from left to right at the Top of the Screen )

For a better example:

I have a HUD:
http://img366.imageshack.us/img366/4830 ... ienrh8.png[/IMG]

And these Curved Bar-Piece:
http://img476.imageshack.us/img476/5006/kh100xy7.png[/IMG]

(The White is Transparent)

You see, before the Curved Part, is a Rect Part free space... I want a HP-Bar there. If the Bar is full ( full is where the curve starts ), the curved part will be getting fuller ( if the HP % is below 69.. the curve is empty and the bar gets emptier ).

How can i make that?

If you can create me something, i send you the Cuvre-Pictures ( from 69 to 100 ).
I don't know what your talking about... But I would copy my scripts out of the demo because DF's was a bit buggy. If that doesn't work, then elaborate a little and I can probably make something work.
The script is defaulted to have 61-100 percent be the curved part, you can't do that?

As for making multiple bars, here's what you do(replace # with the number bar it is):
@healthbar# = Sprite_KHBar.new
@Healthbar#.x = (#-1) * 200
Expand to see the code.
@Sasuke89:
I can?t copy the Bar System out of your Demo, because it?s running reversed ( Your Bars is getting emptier from the curve to the rectangle-Bar )..

But i need the Curved Bar getting emtier first, before the rectangle.

@DeM0nFiRe:
I copied the Bar-Script 3 Times and changed the name and Sprite numbers.. so i can call them like i need them ^^.
Lol, that works too. The script will have built in multi-compatibility in v2.
[QUOTE=Sir Lord Biowulve;250013]@Sasuke89:
I can?t copy the Bar System out of your Demo, because it?s running reversed ( Your Bars is getting emptier from the curve to the rectangle-Bar )..

But i need the Curved Bar getting emtier first, before the rectangle.

@DeM0nFiRe:
I copied the Bar-Script 3 Times and changed the name and Sprite numbers.. so i can call them like i need them ^^.[/QUOTE]

Yup it's reverse alright....can you fix that Sasuke?
Alright guys, I'll start working on v2 of this script. here are some features I plan on including for v2:
-Draws entire bar for you
-HP numerals displayed
-Character Graphic Displayed in curve of bar
-Graphic for empty bar that will be replaced automatically by your own background if you put one
-Better looking
-Built-in support for multiple bars
Can't wait!
Ok, it will still be a few days, sorry guys. I've decided to rethink it to make it more effecient. In the mean time I've made this HUD http://www.rmxp.org/forums/showthread.php?t=25950
Anyone still interested?
I do still plan on making a new version of this, however it will take some time. I've got alot of stuff to work on now. Really sorry for the delay.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=25032