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

Author
Message
Sephiroth
22
Years of Service
User Offline
Joined: 1st Oct 2002
Location: United Kingdom
Posted: 1st Oct 2002 18:06
I was wondering if someone could please help me with a little problem. I am making a text adventure called "SoulQuest" and was wondering how to:

1. Make a Halo/Buffy Main Menu.
2. In a battle scene for the health bars to diminish and change colour if that character is hit.

Thanks WELL in advance for this help.

SEPHIROTH
Shining Moonblade
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 3rd Oct 2002 00:37
Let's see:

I think what you need to do is use the BOX command and make a big rectangle. After you set the top, left, and bottom values where you want them, make the length of the bar change with the right value (and the health). Like this:

box left#, top#, right#, bottom#

As the health decreases, change the value accordingly by finding the max length of the bar and subtracting the amount you need.

percentageofhealth# = maxhealth# * healthrightnow#
right#=(maxlength# + left) * percentageofhealth#

As your health decreases you can change the color of the bar by using the INK command. (The box command creates a box in the color of the last ink command made.) That should do it, in theory.

Shining Blue Blade of Night
Shining Moonblade
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 3rd Oct 2002 00:37
Oh, and sorry, but I don't know much about menu coding, so I won't be much help there. Sorry.

Shining Blue Blade of Night

Login to post a reply

Server time is: 2024-11-23 14:48:34
Your offset time is: 2024-11-23 14:48:34