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
Questions and feedback are welcome.
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
Code:
################################################################################
#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
Questions and feedback are welcome.