It's been awhile since i been on here let alone worked on my project, i now have time to do so and ive actually wanted to implement something i came across. i want the Enemy Hp to appear at the top in the corner of the screen when targeting them for a more cleanly look vs having the hp bar under or above the enemy. wanted to know if someone could assist with this, here's an image showcasing exacting what I'm looking to achieve. a simple but effective look, with maybe some options to change the color of the HP bar and even the length/Width depending on if its a boss monster or not. hopefully i can get some help to achieve this!
Enemy HP in Target screen Script assistance
RPG Maker VXAce SupportI won't do all the work for you, but I can give you a window class that would allow you to display the data if you know how to do that.
Now you'd have to find the place where you can make these calls:
What's that enemy variable?
It should be your current target, one among all of the $game_troop.members currently available in the battlefield.
Ruby:
class Window_EnemyHP < Window_Base
def initialize(wx, wy)
super(wx, wy, Graphics.width, 52)
end
def enemy=(new_enemy)
@enemy = new_enemy
refresh
show
end
def refresh
draw_text(contents.rect, @enemy.name, 1)
draw_actor_hp(@enemy, Graphics.width - 148, 0, 124)
end
end
Now you'd have to find the place where you can make these calls:
Ruby:
@enemy_hp = Window_EnemyHP.new(0, 0)
# And later on...
@enemy_hp.enemy = enemy
# And once you no longer need it being displayed on screen...
@enemy_hp.hide
What's that enemy variable?
It should be your current target, one among all of the $game_troop.members currently available in the battlefield.
Hey! sorry for the late reply. I would make these as script calls? Also this was a screenshot i found awhile back couldnt find the source so not sure about the enemy variable ect.
was wondering if you could explain abit more as to where im doing the script call and how to display the data you mentioned?
That depends a lot on your battle system script...
damn, well I'm currently using Theo's sideview battle system
Original thread: https://forums.rpgmakerweb.com/threads/enemy-hp-in-target-screen-script-assistance.179145/