Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Health bar question

Author
Message
Abraxis
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location:
Posted: 30th Nov 2008 23:48
I understand how to make a health bar coding by using a box for the health gauge for my character. What I'm looking for is to see if I can bend that box into an eclipse shape.

I've made a circular picture of my hero and want to have his health bar going around him. From at the bottom going clockwise to the other side. This will also be used for Exp gaining.

Any suggestions?

If you do something 10,000 times. Your bound to get it right once.
Databug
15
Years of Service
User Offline
Joined: 27th Oct 2008
Location: Elsewhere
Posted: 1st Dec 2008 00:12 Edited at: 1st Dec 2008 00:53
you can use cosine and sine functions like this



if you need the dot bigger you can use "box" instead of "dot"
if you want the health bar to go the other way delete "step -1" and instead of "90 - CircleHealth" put "90 + CirleHealth"
do the same for exp but a bigger or smaller circle
hope it helps
Abraxis
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location:
Posted: 1st Dec 2008 21:16
Databug ~> I've tried out your code, but all I got was a dot in the upper left hand corner of the screen.

what about using an Ellipse command?

If you do something 10,000 times. Your bound to get it right once.
Abraxis
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location:
Posted: 1st Dec 2008 21:52
To make things easier. Try downloading my ruff draft of my Experience gauge to use with.

If you do something 10,000 times. Your bound to get it right once.

Attachments

Login to view attachments
Databug
15
Years of Service
User Offline
Joined: 27th Oct 2008
Location: Elsewhere
Posted: 2nd Dec 2008 01:28 Edited at: 2nd Dec 2008 01:30
whoops i forgot to set the variables
HeroX is your hero's x position
HeroY is the y position
Health is the current health
MaxHealth is the maximum health
CircleRadius is how big you want the circle to be

try this when ive set the variables



will check rough draft later kinda busy
Databug
15
Years of Service
User Offline
Joined: 27th Oct 2008
Location: Elsewhere
Posted: 3rd Dec 2008 04:13
Well, dang. I don't have photoshop ('till Christmas) so i can't look at your file.
Srry bout that

Login to post a reply

Server time is: 2024-09-27 22:27:03
Your offset time is: 2024-09-27 22:27:03