Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Hp bar as hearts?


Necromancer
 Share

Recommended Posts

I was wondering if it would be possible to use hearts as health? Like one big heart with filled with pink and the pink goes down as you run out of health. Or a healthbar where there is 10 hearts lined up next to eachother and the hp bar goes down by half a bar each time. If anyone has an idea on how to do that thanks!

If you want something explained better just ask, I know I am not the best person for explaining things.

~Necromancer~
Link to comment
Share on other sites

make a line of empty and a line of full hearts.
Make the line of full hearts be above the line of empty ones, just make it go down if you lose hp.
And if you want it to go down a heart/half a heart each time you could round the values.

Regards, Xeross
Link to comment
Share on other sites

If you want, do it like this:
1) Make imgHeart(0)… all the way to like imgHeart(19)
2) Make the player's actual health into very small variables (such as [3*4] (3 means the total hearts and 4 means the 1/4 part of heart taken out per 1 dmg) HP total at Lv.1 and 20 total at Lv.[Max])
3) Make a check in the modHandleData.bas (where it determines the shpHP.width via packets received) of the player's exact HP and make that determine how much out of (x/4) (current total hp/total hp) (x being the player's current HP).

Here's an example:
If GetPlayerHP(MyIndex) < 5 Then
frmMirage.imgHeart(0).Picture = LoadPicture(App.Path & "\GUI\CUSTOM\" & GetPlayerHP(MyIndex) & "_4heart.bmp") '4_4heart.bmp is the name of your complete heart container with 4/4 total, 3_4heart.bmp would be the 3/4 total…
ElseIf GetPlayerHP(MyIndex) < 9 And GetPlayerHP(MyIndex) > 4 Then
frmMirage.imgHeart(0).Picture = LoadPicture(App.Path & "\GUI\CUSTOM\4_4heart.bmp")
frmMirage.imgHeart(1).Picture = LoadPicture(App.Path & "\GUI\CUSTOM\" & (GetPlayerHP(MyIndex) - 4) & "_4heart.bmp")
ElseIf GetPlayerHP(MyIndex) ... and you would continue for how much you want to set your maxhp to in-game
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...