boss health bar

Topics regarding Scripting with Reality Factory
Post Reply
Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

boss health bar

Post by Veleran » Tue Dec 31, 2019 1:15 pm

What commands should i look for to display a boss health bar like the first castlevania titles,somewhere high on screen whileyou are near the boss and he is still alive?
I wonder how i will set up the hud bar for him.Sounds like a big deal.

User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: boss health bar

Post by steven8 » Wed Jan 01, 2020 7:17 am

I sure wish I could help you, but I totally stink at scripting. I tried to find a way to do it through the ini files, but I do not see h[w.

[edit]

Maybe I see a way?

From robot.s:

HEALTHATTRIBUTE [enemy_health] // name of pawns health attribute
HEALTH [100] // initial pawn health
DAMAGEATTRIBUTE [health] // attribute damaged by attack

From HUD.ini

[health]
type = horizontal
frame = hud\pumpkin.bmp
framealpha = hud\a_pumpkin.bmp
;indicator = hud\hud_health_oxygeni.bmp
;indicatoralpha = hud\a_hud_healthi.bmp
framex = 10
framey = 10
;indicatoroffsetx = 75
;indicatoroffsety = 0
;indicatorwidth = 160

[~health]
type = numeric
framex = 57
framey = 98
indicatoroffsetx = 0
indicatoroffsety = 0
font = 7
width = 3

What if you just changed the HUD element to:

[enemy_health]
type = horizontal
frame = hud\pumpkin.bmp
framealpha = hud\a_pumpkin.bmp
;indicator = hud\hud_health_oxygeni.bmp
;indicatoralpha = hud\a_hud_healthi.bmp
framex = 10
framey = 10
;indicatoroffsetx = 75
;indicatoroffsety = 0
;indicatorwidth = 160

[~health]
type = numeric
framex = 57
framey = 98
indicatoroffsetx = 0
indicatoroffsety = 0
font = 7
width = 3

Of course, you would have to position it on the screen different from your player health, but might it work?

P.S. - Realize the BMPs being used are from my Pumpkin Jones game, hence the odd titles. :)
Steve Dilworth - Resisting change since 1965!

Post Reply