Does any one have a Script where it shows the monsters HP. On the default battle system. I don't need the Side-by-Side Battle system. Just the Default one.
Thanks in advance,
JJ :)
i've make a topic with an item analyser if u're interesting tell me
you mean an add-on to the original script to show the enemy hp..ok
describe where you want it to be positioned and then somebody might be able to help you
Well, Above the Enemy Would be appropriate. Please
points to sig im learning ruby at the moment i can edit scripts and advise people on how to word there request but i hav no idea yet
Its below the enemy, but im sure its useful for you.
http://www.rmxp.net/forums/index.php?showtopic=6647&hl=enemy+hp
here we go if you dont have a rmxp account:
someone else made this not me i might edit it to be above the monster but later he....
Ok here's the script read carefully:
in Window_Base add:
def draw_enemy_hp_meter(enemy, x, y, width = 156, type = 0)
if type == 1 and enemy.hp == 0
return
end
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255)) #0, 0, 0, 255
self.contents.fill_rect(x, y+28, width * enemy.hp/ enemy.maxhp,4, Color.new(0, 100, 155, 255)) #0, 255, 255, 255
end
Make a new window under window_battlestatus and add:
class Window_EnemyBar < Window_Base
#Thanks to rpgmaker for helping me with the x and y placements.
#--------------------------------------------------------------------------
# â— ã,ªãƒ–ã,¸ã,§ã,¯ãƒˆåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.z = 9998
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
end
#--------------------------------------------------------------------------
# â— è§£æ"¾
#--------------------------------------------------------------------------
def dispose
super
end
#--------------------------------------------------------------------------
# ◠リフレッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_troop.enemies.size
for i in 0...$game_troop.enemies.size
enemy = $game_troop.enemies[i]
if enemy = $game_troop.enemies[0]
draw_enemy_hp_meter(enemy, enemy.screen_x - 75, enemy.screen_y - 40, 120)
self.contents.font.color = brightgray_color
self.contents.draw_text(enemy.screen_x - 90, enemy.screen_y - 25, 100, 32, "HP:")
self.contents.draw_text(enemy.screen_x - 20, enemy.screen_y - 25, 100, 32, enemy.hp.to_s + " / ")
self.contents.draw_text(enemy.screen_x, enemy.screen_y - 25, 100, 32, " " + enemy.maxhp.to_s)
end
if enemy = $game_troop.enemies[1]
draw_enemy_hp_meter(enemy, enemy.screen_x - 75, enemy.screen_y - 40, 120)
self.contents.font.color = brightgray_color
self.contents.draw_text(enemy.screen_x - 90, enemy.screen_y - 25, 100, 32, "HP:")
self.contents.draw_text(enemy.screen_x - 20, enemy.screen_y - 25, 100, 32, enemy.hp.to_s + " / ")
self.contents.draw_text(enemy.screen_x, enemy.screen_y - 25, 100, 32, " " + enemy.maxhp.to_s)
end
if enemy = $game_troop.enemies[2]
draw_enemy_hp_meter(enemy, enemy.screen_x - 75, enemy.screen_y - 40, 120)
self.contents.font.color = brightgray_color
self.contents.draw_text(enemy.screen_x - 90, enemy.screen_y - 25, 100, 32, "HP:")
self.contents.draw_text(enemy.screen_x - 20, enemy.screen_y - 25, 100, 32, enemy.hp.to_s + " / ")
self.contents.draw_text(enemy.screen_x, enemy.screen_y - 25, 100, 32, " " + enemy.maxhp.to_s)
end
end
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
end
In Winow_Base where you see the colors defined add:
def brightgray_color
return Color.new(200, 200, 200, 255)
end
in Scene_Battle 1 (Thanks to rpgmaker for helping me along with this)
add
@enemy_window = Window_EnemyBar.new
@enemy_window.opacity = 0
@enemy_window.back_opacity = 0
in the disposes add:
@enemy_window.dispose
same with the updates add:
@enemy_window.update
Now search for the line
@status_window.refresh
and add:
@enemy_window.refresh
Do this in scene battler 2 (There should only be one)
and 3 in scene battler 4
and that's it.
Any probs let me know.
Sorry to ask but how does one make the actual script work?
im sorry im drugged up on stuff for my cold ill post them on my previous post
Thanks Alot.
I've done that and when I try to test the game a message appears saying:
?????'Window_EnemyBar'?50??? SyntaxError ????????
Indeed, Me too. VampireHSS and Me and Some other people are making a game.
can you give me the line that it is on i may be able to fix it if not i shall post a message to the creator on your behaf
It appears when I try to start the game, it doesn't say anything else, do you want a screenshot from it?
any chance of a working enemy hp script?
It does work. Test your game. When you get the error, go to the script editior and find the line. Most chances are its a line with the line $fontsize.
Just change it to 22.
How do I know which of the "categoryes" is the error?
How do I know the line of the error?
Could you post the script with the enlarged line ? Please
please dwarra
Can somebody please post this Completed !!!
Okay! To find your problem do play test, you get the error now go to the script manager and POOF! You're at the errored line.
Now according to how I read your error, you did not follow the instructions of the script, so I suggest you do it properly before complaining again.
Edit: It works now except for this line in the script:
bitmap=RPG::Cache.picture("limit_gradient")
Where do I get this?(because it says that it can't find it when I start a battle)
Quote from: noianEdit: It works now except for this line in the script:
bitmap=RPG::Cache.picture("limit_gradient")
Where do I get this?(because it says that it can't find it when I start a battle)
considering it's called 'limit_gradient' I'm guessing it has absolutely nothing to do with the monster Hp bar script and has to do with the fact that you didn't get the image from the same place you found the
limit-break/limits/overdrive/etc. script.
i can get the bar to show no but can't get the Monster HP words to show