Oh it's okay. I just need it to draw the bars by itself.
DeM0nFiRe's KH Health Bar
Script ArchiveYup, and I do still plan on making that update, it's just that it will take me a while to do it.
Okay now I really need it....
waiting for the new Version too...
I really seriously need, sorry if I sound rude, but I can't continue my BS without this....:(
Yeah, I'm really sorry but I've got a zillion projects I have to work on. I would seriously reccomend going with one of the other KH Huds that are around (use the Forum Script Listing) This one I made is really poorly done. If you'd like, PM me and I can make another HUD for you that'll be better quality.
hey man why not do loop to check all them
when 4
when 5
when 6
stuff
when 4
when 5
when 6
stuff
Like I said, this was my first released script, and it's very poorly coded. I just have been too busy to update it. I'm sorry for any inconvenience this causes anyone.
Well, I'm still not that advanced of a scripter, but wouldn't it be a bit more organized to use
when 1...100
self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
end
instead? I know this was your first script but it would be nice to make a few revisions to it and I'm a bit too lazy to go upstairs turn on my laptop and try it out right now.
Now if this version works, it would be more efficent since it isn't running through the whole script looking for the right one, instead it just runs through one function looking for the right variable. Not only that, but it wouldn't be refreshing every frame so that would lessen lag. If you want though, I could make the hud in my spare time tomorrow since I have nothing else to do and it's getting a little late over here.
when 1...100
self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
end
instead? I know this was your first script but it would be nice to make a few revisions to it and I'm a bit too lazy to go upstairs turn on my laptop and try it out right now.
"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
@frame = $game_party.actors[0].hp * 100 / $game_party.actors[0].maxhp
update
end
#--------------------
def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end
#--------------------
def update
color = Color.new(36, 185, 63)
@frame = $game_party.actors[0].hp * 100 / $game_party.actors[0].maxhp
case @frame.round
when 1...100
self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
end
end
end
#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
@frame = $game_party.actors[0].hp * 100 / $game_party.actors[0].maxhp
update
end
#--------------------
def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end
#--------------------
def update
color = Color.new(36, 185, 63)
@frame = $game_party.actors[0].hp * 100 / $game_party.actors[0].maxhp
case @frame.round
when 1...100
self.bitmap.fill_rect(0,170,@frame.round * 2,10,color)
end
end
end
Expand to see the code.
Now if this version works, it would be more efficent since it isn't running through the whole script looking for the right one, instead it just runs through one function looking for the right variable. Not only that, but it wouldn't be refreshing every frame so that would lessen lag. If you want though, I could make the hud in my spare time tomorrow since I have nothing else to do and it's getting a little late over here.
Hey can you make them draw the bars automatically?
Hey guys I need this bar, I've been searching for it a long time. Could you do a new version of it?
Hey I just noticed that you are going to have character graphics instead of faces? Please make it so we can put up a face....or do you mean character graphic as the face?
Well, I myself am too busy to fix this script, however if anyone else wants to fix it, let me know and I'll give a little bit of guidance. (To take this up you need to know at least a fair amopunt of RGSS)
Original thread: https://www.hbgames.org/forums/viewtopic.php?t=25032